mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
Allow openwrt to build with static
This commit is contained in:
parent
206a547cb8
commit
0bf7f2f740
@ -12,6 +12,10 @@ if (current_toolchain == default_toolchain) {
|
|||||||
|
|
||||||
assert(current_os == "openwrt")
|
assert(current_os == "openwrt")
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
build_static = false
|
||||||
|
}
|
||||||
|
|
||||||
# This is included by reference in the //build/config/compiler config that
|
# This is included by reference in the //build/config/compiler config that
|
||||||
# is applied to all targets. It is here to separate out the logic that is
|
# is applied to all targets. It is here to separate out the logic that is
|
||||||
# Android-only.
|
# Android-only.
|
||||||
@ -24,7 +28,10 @@ config("compiler") {
|
|||||||
"__UCLIBC__",
|
"__UCLIBC__",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (current_cpu == "x86") {
|
if (build_static) {
|
||||||
|
# Musl static objects are not built with -fPIC, cannot use -static-pie.
|
||||||
|
ldflags += [ "-static" ]
|
||||||
|
} else if (current_cpu == "x86") {
|
||||||
ldflags += [ "-Wl,--dynamic-linker=/lib/ld-musl-i386.so.1" ]
|
ldflags += [ "-Wl,--dynamic-linker=/lib/ld-musl-i386.so.1" ]
|
||||||
} else if (current_cpu == "mipsel") {
|
} else if (current_cpu == "mipsel") {
|
||||||
ldflags += [ "-Wl,--dynamic-linker=/lib/ld-musl-mipsel-sf.so.1" ]
|
ldflags += [ "-Wl,--dynamic-linker=/lib/ld-musl-mipsel-sf.so.1" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user