OLD | NEW |
---|---|
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """ | 5 """ |
6 This module contains classes that help to emulate xcodebuild behavior on top of | 6 This module contains classes that help to emulate xcodebuild behavior on top of |
7 other build systems, such as make and ninja. | 7 other build systems, such as make and ninja. |
8 """ | 8 """ |
9 | 9 |
10 import copy | 10 import copy |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
518 | 518 |
519 if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'): | 519 if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'): |
520 cflags.append('-fvisibility=hidden') | 520 cflags.append('-fvisibility=hidden') |
521 | 521 |
522 if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'): | 522 if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'): |
523 cflags.append('-Werror') | 523 cflags.append('-Werror') |
524 | 524 |
525 if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'): | 525 if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'): |
526 cflags.append('-Wnewline-eof') | 526 cflags.append('-Wnewline-eof') |
527 | 527 |
528 # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or | |
529 # llvm-gcc. It also requires a fairly recent libtool, and | |
530 # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the | |
531 # path to the libLTO.dylib that matches the used clang. | |
532 if self._Test('LLVM_LTO', 'YES', default='NO'): | |
533 cflags.append('-flto') | |
534 | |
scottmg
2015/04/01 23:50:21
nit; extra \n
| |
535 | |
528 self._AppendPlatformVersionMinFlags(cflags) | 536 self._AppendPlatformVersionMinFlags(cflags) |
529 | 537 |
530 # TODO: | 538 # TODO: |
531 if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'): | 539 if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'): |
532 self._WarnUnimplemented('COPY_PHASE_STRIP') | 540 self._WarnUnimplemented('COPY_PHASE_STRIP') |
533 self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS') | 541 self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS') |
534 self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS') | 542 self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS') |
535 | 543 |
536 # TODO: This is exported correctly, but assigning to it is not supported. | 544 # TODO: This is exported correctly, but assigning to it is not supported. |
537 self._WarnUnimplemented('MACH_O_TYPE') | 545 self._WarnUnimplemented('MACH_O_TYPE') |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1593 if toolset == 'target': | 1601 if toolset == 'target': |
1594 iphoneos_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' | 1602 iphoneos_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' |
1595 return targets | 1603 return targets |
1596 | 1604 |
1597 def CloneConfigurationForDeviceAndEmulator(target_dicts): | 1605 def CloneConfigurationForDeviceAndEmulator(target_dicts): |
1598 """If |target_dicts| contains any iOS targets, automatically create -iphoneos | 1606 """If |target_dicts| contains any iOS targets, automatically create -iphoneos |
1599 targets for iOS device builds.""" | 1607 targets for iOS device builds.""" |
1600 if _HasIOSTarget(target_dicts): | 1608 if _HasIOSTarget(target_dicts): |
1601 return _AddIOSDeviceConfigurations(target_dicts) | 1609 return _AddIOSDeviceConfigurations(target_dicts) |
1602 return target_dicts | 1610 return target_dicts |
OLD | NEW |