Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1563)

Unified Diff: build/config/gcc/BUILD.gn

Issue 275703003: Make GN Android build link executables (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/config/gcc/BUILD.gn
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
index 00ea3caed8a806da6218422702363224babef2dc..8272d8a7462af54c9a1e86a7e23196c5b12630ed 100644
--- a/build/config/gcc/BUILD.gn
+++ b/build/config/gcc/BUILD.gn
@@ -17,3 +17,21 @@ config("symbol_visibility_hidden") {
# config since that can almost always be applied.
cflags = [ "-fvisibility=hidden" ]
}
+
+# Settings for executables and shared libraries.
+config("executable_ldconfig") {
+ ldflags = [
+ # Want to pass "\$". Need to escape both '\' and '$'. GN will re-escape as
+ # required for ninja.
+ "-Wl,-rpath=\\\$ORIGIN/lib/",
+
+ "-Wl,-rpath-link=lib/",
+ ]
+
+ if (is_android) {
+ ldflags += [
+ "-Bdynamic",
+ "-Wl,-z,nocopyreloc",
+ ]
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698