diff options
-rw-r--r-- | gn/BUILD.gn | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn index 60dddffd40..79e3e866f2 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -152,7 +152,6 @@ config("default") { "--sysroot=$ndk/platforms/$ndk_platform", "--target=$ndk_target", "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", - "-pie", ] lib_dirs = [ "$ndk/sources/cxx-stl/llvm-libc++/libs/$ndk_stdlib", @@ -403,7 +402,9 @@ config("release") { } config("executable") { - if (is_mac) { + if (is_android) { + ldflags = [ "-pie" ] + } else if (is_mac) { ldflags = [ "-Wl,-rpath,@loader_path/." ] } else if (is_linux) { ldflags = [ |