diff options
author | justincohen@google.com <justincohen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 23:05:05 +0000 |
---|---|---|
committer | justincohen@google.com <justincohen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 23:05:05 +0000 |
commit | 8dec8fc5f3cb06cc2935b30b4090b17fe2152b26 (patch) | |
tree | 056812615e6df2da2b9fb904aac10276f583c3a2 /build | |
parent | 665d50d1fe6ff12d469b1076ba10cbbf15324a70 (diff) | |
download | chromium_src-8dec8fc5f3cb06cc2935b30b4090b17fe2152b26.zip chromium_src-8dec8fc5f3cb06cc2935b30b4090b17fe2152b26.tar.gz chromium_src-8dec8fc5f3cb06cc2935b30b4090b17fe2152b26.tar.bz2 |
Force load the Xcode arc libraries when building with llvm-build.
It is necessary to force load libarclite from Xcode for
third_party/llvm-build because libarclite_* is only
distributed by Xcode.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/15570002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 64 |
1 files changed, 55 insertions, 9 deletions
diff --git a/build/common.gypi b/build/common.gypi index 130ae7d..8b460d2 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -4052,17 +4052,10 @@ }, }, }, - 'xcode_settings': { - # It is necessary to link with the -fobjc-arc flag to use - # subscripting on iOS < 6. - 'OTHER_LDFLAGS': [ - '-fobjc-arc', - ], - }, 'conditions': [ - # TODO(justincohen): ninja builds don't support signing yet. - ['"<(GENERATOR)"!="ninja"', { + ['"<(GENERATOR)"=="xcode"', { 'xcode_settings': { + # TODO(justincohen): ninja builds don't support signing yet. 'conditions': [ ['chromium_ios_signing', { # iOS SDK wants everything for device signed. @@ -4074,6 +4067,59 @@ ], }, }], + ['"<(GENERATOR)"=="xcode" and clang!=1', { + 'xcode_settings': { + # It is necessary to link with the -fobjc-arc flag to use + # subscripting on iOS < 6. + 'OTHER_LDFLAGS': [ + '-fobjc-arc', + ], + }, + }], + ['clang==1', { + 'target_conditions': [ + ['_toolset=="target"', { + 'variables': { + 'developer_dir': '<!(xcode-select -print-path)', + 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc', + }, + # It is necessary to force load libarclite from Xcode for + # third_party/llvm-build because libarclite_* is only + # distributed by Xcode. + 'conditions': [ + ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-force_load', + '<(arc_toolchain_path)/libarclite_iphoneos.a', + ], + }, + }], + ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + '-force_load', + '<(arc_toolchain_path)/libarclite_iphonesimulator.a', + ], + }, + }], + # Xcode sets target_arch at compile-time. + ['"<(GENERATOR)"=="xcode"', { + 'xcode_settings': { + 'OTHER_LDFLAGS[arch=armv7]': [ + '-force_load', + '<(arc_toolchain_path)/libarclite_iphoneos.a', + ], + 'OTHER_LDFLAGS[arch=i386]': [ + '-force_load', + '<(arc_toolchain_path)/libarclite_iphonesimulator.a', + ], + }, + }], + ], + }], + ], + }], ], }], ], # target_conditions |