Chromium Code Reviews| 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"', { |