Index: build/config/gcc/BUILD.gn |
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn |
index c6cfe72abe18dc4e5c295f9b4092847896cdb26d..40243cd677e5429fcccce28491455fe9176f2f88 100644 |
--- a/build/config/gcc/BUILD.gn |
+++ b/build/config/gcc/BUILD.gn |
@@ -20,21 +20,22 @@ config("symbol_visibility_hidden") { |
# Settings for executables and shared libraries. |
config("executable_ldconfig") { |
- ldflags = [ |
- # Want to pass "\$". GN will re-escape as required for ninja. |
- "-Wl,-rpath=\$ORIGIN/", |
- "-Wl,-rpath-link=", |
- |
- # Newer binutils don't set DT_RPATH unless you disable "new" dtags |
- # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
- "-Wl,--disable-new-dtags", |
- ] |
- |
if (is_android) { |
- ldflags += [ |
+ ldflags = [ |
"-Bdynamic", |
"-Wl,-z,nocopyreloc", |
] |
+ } else { |
+ # Android doesn't support rpath. |
+ ldflags = [ |
+ # Want to pass "\$". GN will re-escape as required for ninja. |
+ "-Wl,-rpath=\$ORIGIN/", |
+ "-Wl,-rpath-link=", |
+ |
+ # Newer binutils don't set DT_RPATH unless you disable "new" dtags |
+ # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
+ "-Wl,--disable-new-dtags", |
+ ] |
} |
} |