summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-10-16 17:03:48 -0700
committerNico Weber <thakis@chromium.org>2015-10-17 00:04:55 +0000
commitf0fa84cdd8a2037059bec96df1bf6eb3d533ebf9 (patch)
tree0c5f75aca85ae85f335f1fcb5c699453ae12f9f4 /build/common.gypi
parent26fd65cedd6cfdab607c67775c0529533bfcc676 (diff)
downloadchromium_src-f0fa84cdd8a2037059bec96df1bf6eb3d533ebf9.zip
chromium_src-f0fa84cdd8a2037059bec96df1bf6eb3d533ebf9.tar.gz
chromium_src-f0fa84cdd8a2037059bec96df1bf6eb3d533ebf9.tar.bz2
mac: In component builds, link against libc++.
Using libc++ this way requires OS X 10.7, but for component builds that's ok. (It's a developer-only config, we require, 10.8 for building already, and moving a component build to a 10.6 box for testing is very difficult already – so people testing stuff on 10.6 will do so with static library builds.) Since the deployment target is still 10.6, Xcode's clang would complain that libc++ requires 10.7 while the deployment target asks for 10.6. Open-source clang (and hence Chromium's clang) doesn't complain about this. (We haven't used Xcode's clang on Mac in 4 years.) For static library builds we'll have to do something else. I have a plan, but that's for a separate CL. I tried doing this change in gn too, but the gn/mac build is currently so broken that `gn gen` errors out on me without any local changes. I'll port this to gn in a follow-up. BUG=400091 R=mark@chromium.org Review URL: https://codereview.chromium.org/1408263002 . Cr-Commit-Position: refs/heads/master@{#354646}
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi15
1 files changed, 15 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 40206a1..e7dc617 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5272,6 +5272,21 @@
# specified or not.
'-fno-strict-aliasing', # See http://crbug.com/32204.
],
+ 'conditions': [
+ ['component=="shared_library"', {
+ # In component builds, link to the system libc++. This requires
+ # OS X 10.7, but we currently pass -mmacosx-version-min=10.6.
+ # Xcode's clang complains about this, but our open-source bundled
+ # chromium clang doesn't. This has the effect of making
+ # everything depend on libc++, which means component-build
+ # binaries won't run on 10.6 (no libc++ there), but for a
+ # developer-only configuration that's ok.
+ # (We don't want to raise the deployment target yet so that
+ # official and dev builds have the same deployment target. This
+ # affects things like which functions are considered deprecated.)
+ 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
+ }],
+ ],
},
'target_conditions': [
['_type=="executable"', {