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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 cflags_cc.append('-fno-rtti') | 357 cflags_cc.append('-fno-rtti') |
358 if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'): | 358 if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'): |
359 cflags_cc.append('-fno-exceptions') | 359 cflags_cc.append('-fno-exceptions') |
360 if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'): | 360 if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'): |
361 cflags_cc.append('-fvisibility-inlines-hidden') | 361 cflags_cc.append('-fvisibility-inlines-hidden') |
362 if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'): | 362 if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'): |
363 cflags_cc.append('-fno-threadsafe-statics') | 363 cflags_cc.append('-fno-threadsafe-statics') |
364 | 364 |
365 other_ccflags = [] | 365 other_ccflags = [] |
366 | 366 |
367 # TODO(thakis): Remove this once | 367 for flag in self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']): |
368 # http://code.google.com/p/webrtc/source/detail?r=2028 is rolled into | |
369 # chromium. | |
370 flags = self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']) | |
371 if not isinstance(flags, list): | |
372 flags = [flags] | |
373 | |
374 for flag in flags: | |
375 # TODO: More general variable expansion. Missing in many other places too. | 368 # TODO: More general variable expansion. Missing in many other places too. |
376 if flag in ('$inherited', '$(inherited)', '${inherited}'): | 369 if flag in ('$inherited', '$(inherited)', '${inherited}'): |
377 flag = '$OTHER_CFLAGS' | 370 flag = '$OTHER_CFLAGS' |
378 if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'): | 371 if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'): |
379 other_ccflags += self._Settings().get('OTHER_CFLAGS', []) | 372 other_ccflags += self._Settings().get('OTHER_CFLAGS', []) |
380 else: | 373 else: |
381 other_ccflags.append(flag) | 374 other_ccflags.append(flag) |
382 cflags_cc += other_ccflags | 375 cflags_cc += other_ccflags |
383 | 376 |
384 self.configname = None | 377 self.configname = None |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 def GetSpecPostbuildCommands(spec, quiet=False): | 1038 def GetSpecPostbuildCommands(spec, quiet=False): |
1046 """Returns the list of postbuilds explicitly defined on |spec|, in a form | 1039 """Returns the list of postbuilds explicitly defined on |spec|, in a form |
1047 executable by a shell.""" | 1040 executable by a shell.""" |
1048 postbuilds = [] | 1041 postbuilds = [] |
1049 for postbuild in spec.get('postbuilds', []): | 1042 for postbuild in spec.get('postbuilds', []): |
1050 if not quiet: | 1043 if not quiet: |
1051 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( | 1044 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( |
1052 spec['target_name'], postbuild['postbuild_name'])) | 1045 spec['target_name'], postbuild['postbuild_name'])) |
1053 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) | 1046 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) |
1054 return postbuilds | 1047 return postbuilds |
OLD | NEW |