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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 self._WarnUnimplemented('MACH_O_TYPE') | 287 self._WarnUnimplemented('MACH_O_TYPE') |
288 self._WarnUnimplemented('PRODUCT_TYPE') | 288 self._WarnUnimplemented('PRODUCT_TYPE') |
289 | 289 |
290 archs = self._Settings().get('ARCHS', ['i386']) | 290 archs = self._Settings().get('ARCHS', ['i386']) |
291 if len(archs) != 1: | 291 if len(archs) != 1: |
292 # TODO: Supporting fat binaries will be annoying. | 292 # TODO: Supporting fat binaries will be annoying. |
293 self._WarnUnimplemented('ARCHS') | 293 self._WarnUnimplemented('ARCHS') |
294 archs = ['i386'] | 294 archs = ['i386'] |
295 cflags.append('-arch ' + archs[0]) | 295 cflags.append('-arch ' + archs[0]) |
296 | 296 |
| 297 if archs[0] in ('i386', 'x86_64'): |
| 298 if self._Test('GCC_ENABLE_SSE3_EXTENSIONS', 'YES', default='NO'): |
| 299 cflags.append('-msse3') |
| 300 if self._Test('GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS', 'YES', |
| 301 default='NO'): |
| 302 cflags.append('-mssse3') # Note 3rd 's'. |
| 303 if self._Test('GCC_ENABLE_SSE41_EXTENSIONS', 'YES', default='NO'): |
| 304 cflags.append('-msse4.1') |
| 305 if self._Test('GCC_ENABLE_SSE42_EXTENSIONS', 'YES', default='NO'): |
| 306 cflags.append('-msse4.2') |
| 307 |
297 cflags += self._Settings().get('OTHER_CFLAGS', []) | 308 cflags += self._Settings().get('OTHER_CFLAGS', []) |
298 cflags += self._Settings().get('WARNING_CFLAGS', []) | 309 cflags += self._Settings().get('WARNING_CFLAGS', []) |
299 | 310 |
300 config = self.spec['configurations'][self.configname] | 311 config = self.spec['configurations'][self.configname] |
301 framework_dirs = config.get('mac_framework_dirs', []) | 312 framework_dirs = config.get('mac_framework_dirs', []) |
302 for directory in framework_dirs: | 313 for directory in framework_dirs: |
303 cflags.append('-F ' + directory.replace('$(SDKROOT)', sdk_root)) | 314 cflags.append('-F ' + directory.replace('$(SDKROOT)', sdk_root)) |
304 | 315 |
305 self.configname = None | 316 self.configname = None |
306 return cflags | 317 return cflags |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 # absolutified. Else, it's in the PATH (e.g. install_name_tool, ln). | 963 # absolutified. Else, it's in the PATH (e.g. install_name_tool, ln). |
953 if os.path.sep in shell_list[0]: | 964 if os.path.sep in shell_list[0]: |
954 shell_list[0] = gyp_path_to_build_path(shell_list[0]) | 965 shell_list[0] = gyp_path_to_build_path(shell_list[0]) |
955 | 966 |
956 # "script.sh" -> "./script.sh" | 967 # "script.sh" -> "./script.sh" |
957 if not os.path.sep in shell_list[0]: | 968 if not os.path.sep in shell_list[0]: |
958 shell_list[0] = os.path.join('.', shell_list[0]) | 969 shell_list[0] = os.path.join('.', shell_list[0]) |
959 postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list)) | 970 postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list)) |
960 | 971 |
961 return postbuilds | 972 return postbuilds |
OLD | NEW |