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

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

Issue 1298783003: Move rpath ldflags under is_component_build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/BUILD.gn
diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn
index 4a65d6017611212b1f51a97f7abad2a43d195be8..61c85bcc10909d8d37402d3135e711e1fbf3d85f 100644
--- a/build/config/mac/BUILD.gn
+++ b/build/config/mac/BUILD.gn
@@ -18,20 +18,22 @@ config("sdk") {
# On Mac, this is used for everything except static libraries.
config("mac_dynamic_flags") {
- ldflags = [
- "-Wl,-search_paths_first",
- "-L.",
+ ldflags = []
- # Path for loading shared libraries for unbundled binaries.
- "-Wl,-rpath,@loader_path/.",
+ if (is_component_build) {
+ ldflags += [
+ # Path for loading shared libraries for unbundled binaries.
+ "-Wl,-rpath,@loader_path/.",
- # Path for loading shared libraries for bundled binaries. Get back from
- # Binary.app/Contents/MacOS.
- "-Wl,-rpath,@loader_path/../../..",
- ]
+ # Path for loading shared libraries for bundled binaries. Get back from
+ # Binary.app/Contents/MacOS.
+ "-Wl,-rpath,@loader_path/../../..",
+ ]
+ }
}
# On Mac, this is used only for executables.
config("mac_executable_flags") {
+ # Remove this when targeting >=10.7 since it is the default in that config.
ldflags = [ "-Wl,-pie" ] # Position independent.
}
« no previous file with comments | « no previous file | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698