diff options
author | Mike Klein <mtklein@chromium.org> | 2016-12-06 10:46:02 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-06 16:38:31 +0000 |
commit | c5875fb58dd7a74daf4dc1a593a6bddb3a864235 (patch) | |
tree | d5b32bf235ac4865a7b560cd965c932053e31683 | |
parent | 13bf6227c5701903b38b5c21a15c8323dec7734a (diff) |
-pie applies only to executables
Change-Id: I36dff113145befbfb4f69810a474394d5d0ca4ed
Reviewed-on: https://skia-review.googlesource.com/5553
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
-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 = [ |