summaryrefslogtreecommitdiffstats
path: root/chromium/build/config/mac/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/build/config/mac/BUILD.gn')
-rw-r--r--chromium/build/config/mac/BUILD.gn25
1 files changed, 25 insertions, 0 deletions
diff --git a/chromium/build/config/mac/BUILD.gn b/chromium/build/config/mac/BUILD.gn
index 78c106aebf9..2ebf45872d1 100644
--- a/chromium/build/config/mac/BUILD.gn
+++ b/chromium/build/config/mac/BUILD.gn
@@ -2,9 +2,34 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/sysroot.gni")
+
+config("sdk") {
+ common_flags = [
+ "-isysroot", sysroot,
+ "-mmacosx-version-min=10.6"
+ ]
+
+ cflags = common_flags
+ ldflags = common_flags
+}
+
# On Mac, this is used for everything except static libraries.
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.
+config("mac_executable_flags") {
+ ldflags = [
+ "-Wl,-pie", # Position independent.
]
}