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

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

Issue 1236503002: GN: Use lib.unstripped rather than lib.stripped. Add a toolchain.gni (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn15
Patch Set: add comment Created 5 years, 4 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
« no previous file with comments | « build/config/android/rules.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/gcc/BUILD.gn
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
index edfb92c768fec30d14f1e1b35c277b4c8a42e2ec..b6ab1d4b96ba7ba9a39409006f949569551f92d2 100644
--- a/build/config/gcc/BUILD.gn
+++ b/build/config/gcc/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/toolchain/toolchain.gni")
+
# This config causes functions not to be automatically exported from shared
# libraries. By default, all symbols are exported but this means there are
# lots of exports that slow everything down. In general we explicitly mark
@@ -26,11 +28,15 @@ config("executable_ldconfig") {
"-Wl,-z,nocopyreloc",
]
} else {
- # Android doesn't support rpath.
+ # Note: Android doesn't support rpath.
+ rpath_link = ""
+ if (shlib_subdir != ".") {
+ rpath_link = "${shlib_subdir}/"
+ }
ldflags = [
# Want to pass "\$". GN will re-escape as required for ninja.
- "-Wl,-rpath=\$ORIGIN/",
- "-Wl,-rpath-link=",
+ "-Wl,-rpath=\$ORIGIN/${rpath_link}",
+ "-Wl,-rpath-link=${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.
« no previous file with comments | « build/config/android/rules.gni ('k') | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698