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

Unified Diff: build/common.gypi

Issue 1408263002: mac: In component builds, link against libc++. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 944dcb6eebb257bf06dda0140bcd09e45face065..62f322753b9a1527d30c23c95c81b3a07d81f7a8 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5286,6 +5286,29 @@
# 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 -- it just doesn't implicitly add -lc++
+ # either. Explicitly add that flag. 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!="static_library"', {
+ # OTHER_LDFLAGS is passed to both .so and .a links, but only
+ # the former type understands it. Hence the _type check.
+ 'OTHER_LDFLAGS': [ '-lc++' ],
Mark Mentovai 2015/10/16 22:34:59 I thought CLANG_CXX_LIBRARY would have been enough
Nico 2015/10/16 23:08:35 Excellent question! I thought it wasn't enough bec
+ }],
+ ]
+ }],
+ ],
},
'target_conditions': [
['_type=="executable"', {
« 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