Index: build/config/mac/BUILD.gn |
diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn |
index b6db8e0b7104d6638ac1a001b137aa8d968faeb1..2ebf45872d12447d35f9e245412db782a89da8ae 100644 |
--- a/build/config/mac/BUILD.gn |
+++ b/build/config/mac/BUILD.gn |
@@ -18,5 +18,18 @@ config("sdk") { |
config("mac_dynamic_flags") { |
ldflags = [ |
"-Wl,-search_paths_first", |
+ "-L.", |
+ # 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/../../..", |
+ ] |
+} |
+ |
+# On Mac, this is used only for executables. |
Nico
2014/03/03 21:18:09
common.gypi says
# Turn on positi
|
+config("mac_executable_flags") { |
+ ldflags = [ |
+ "-Wl,-pie", # Position independent. |
] |
} |