Chromium Code Reviews

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: forgot to add toolchain.gni Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: build/config/gcc/BUILD.gn
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
index edfb92c768fec30d14f1e1b35c277b4c8a42e2ec..9f5ca7158baeace901f92f55f6e359ddee23da37 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
@@ -27,10 +29,14 @@ config("executable_ldconfig") {
]
} else {
# 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.

Powered by Google App Engine