| 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 gyp.common | 10 import gyp.common |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 self.configname = configname | 353 self.configname = configname |
| 354 cflags_cc = [] | 354 cflags_cc = [] |
| 355 if self._Test('GCC_ENABLE_CPP_RTTI', 'NO', default='YES'): | 355 if self._Test('GCC_ENABLE_CPP_RTTI', 'NO', default='YES'): |
| 356 cflags_cc.append('-fno-rtti') | 356 cflags_cc.append('-fno-rtti') |
| 357 if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'): | 357 if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'): |
| 358 cflags_cc.append('-fno-exceptions') | 358 cflags_cc.append('-fno-exceptions') |
| 359 if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'): | 359 if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'): |
| 360 cflags_cc.append('-fvisibility-inlines-hidden') | 360 cflags_cc.append('-fvisibility-inlines-hidden') |
| 361 if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'): | 361 if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'): |
| 362 cflags_cc.append('-fno-threadsafe-statics') | 362 cflags_cc.append('-fno-threadsafe-statics') |
| 363 if self._Test('GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO', 'NO', default='YES'): |
| 364 cflags_cc.append('-Wno-invalid-offsetof') |
| 363 | 365 |
| 364 other_ccflags = [] | 366 other_ccflags = [] |
| 365 | 367 |
| 366 for flag in self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']): | 368 for flag in self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']): |
| 367 # TODO: More general variable expansion. Missing in many other places too. | 369 # TODO: More general variable expansion. Missing in many other places too. |
| 368 if flag in ('$inherited', '$(inherited)', '${inherited}'): | 370 if flag in ('$inherited', '$(inherited)', '${inherited}'): |
| 369 flag = '$OTHER_CFLAGS' | 371 flag = '$OTHER_CFLAGS' |
| 370 if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'): | 372 if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'): |
| 371 other_ccflags += self._Settings().get('OTHER_CFLAGS', []) | 373 other_ccflags += self._Settings().get('OTHER_CFLAGS', []) |
| 372 else: | 374 else: |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 def GetSpecPostbuildCommands(spec, quiet=False): | 1021 def GetSpecPostbuildCommands(spec, quiet=False): |
| 1020 """Returns the list of postbuilds explicitly defined on |spec|, in a form | 1022 """Returns the list of postbuilds explicitly defined on |spec|, in a form |
| 1021 executable by a shell.""" | 1023 executable by a shell.""" |
| 1022 postbuilds = [] | 1024 postbuilds = [] |
| 1023 for postbuild in spec.get('postbuilds', []): | 1025 for postbuild in spec.get('postbuilds', []): |
| 1024 if not quiet: | 1026 if not quiet: |
| 1025 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( | 1027 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( |
| 1026 spec['target_name'], postbuild['postbuild_name'])) | 1028 spec['target_name'], postbuild['postbuild_name'])) |
| 1027 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) | 1029 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) |
| 1028 return postbuilds | 1030 return postbuilds |
| OLD | NEW |