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

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

Issue 1639343002: [GN][Chromecast] Add "-Wl,-rpath=\$ORIGIN" to executable and shlib defaults. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/chromecast/BUILD.gn
diff --git a/build/config/chromecast/BUILD.gn b/build/config/chromecast/BUILD.gn
index f7a1f502cd52005d8566dd2bd17fb8336481c066..4280e9c9ade9397d6a577681402f6f6042cb5919 100644
--- a/build/config/chromecast/BUILD.gn
+++ b/build/config/chromecast/BUILD.gn
@@ -19,7 +19,19 @@ config("static_config") {
]
}
+config("ldconfig") {
+ visibility = [ ":*" ]
+
+ # Chromecast executables depend on several shared libraries in $ORIGIN. Add
+ # $ORIGIN to the rpath of these executables. This is not inherited by default
+ # when depending on these targets for security reasons (see comments in
+ # //build/config/gcc/BUILD.gn)
+ configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+}
+
config("executable_config") {
+ configs = [ ":ldconfig" ]
+
if (current_cpu == "arm") {
ldflags = [
# Export stdlibc++ and libgcc symbols to force shlibs to refer to these
@@ -40,12 +52,13 @@ config("executable_config") {
# Despite including libstdc++/libgcc archives, we still need to specify
# static linking for them in order to prevent the executable from having a
# dynamic dependency on them.
- configs = [ ":static_config" ]
+ configs += [ ":static_config" ]
}
}
config("shared_library_config") {
+ configs = [ ":ldconfig" ]
if (current_cpu == "arm") {
- configs = [ ":static_config" ]
+ configs += [ ":static_config" ]
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698