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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 # This functions (and the similar ones below) do not offer complete | 227 # This functions (and the similar ones below) do not offer complete |
228 # emulation of all xcode_settings keys. They're implemented on demand. | 228 # emulation of all xcode_settings keys. They're implemented on demand. |
229 | 229 |
230 self.configname = configname | 230 self.configname = configname |
231 cflags = [] | 231 cflags = [] |
232 | 232 |
233 sdk_root = self._SdkPath() | 233 sdk_root = self._SdkPath() |
234 if 'SDKROOT' in self._Settings(): | 234 if 'SDKROOT' in self._Settings(): |
235 cflags.append('-isysroot %s' % sdk_root) | 235 cflags.append('-isysroot %s' % sdk_root) |
236 | 236 |
| 237 if self._Test('GCC_CHAR_IS_UNSIGNED_CHAR', 'YES', default='NO'): |
| 238 cflags.append('-funsigned-char') |
| 239 |
237 if self._Test('GCC_CW_ASM_SYNTAX', 'YES', default='YES'): | 240 if self._Test('GCC_CW_ASM_SYNTAX', 'YES', default='YES'): |
238 cflags.append('-fasm-blocks') | 241 cflags.append('-fasm-blocks') |
239 | 242 |
240 if 'GCC_DYNAMIC_NO_PIC' in self._Settings(): | 243 if 'GCC_DYNAMIC_NO_PIC' in self._Settings(): |
241 if self._Settings()['GCC_DYNAMIC_NO_PIC'] == 'YES': | 244 if self._Settings()['GCC_DYNAMIC_NO_PIC'] == 'YES': |
242 cflags.append('-mdynamic-no-pic') | 245 cflags.append('-mdynamic-no-pic') |
243 else: | 246 else: |
244 pass | 247 pass |
245 # TODO: In this case, it depends on the target. xcode passes | 248 # TODO: In this case, it depends on the target. xcode passes |
246 # mdynamic-no-pic by default for executable and possibly static lib | 249 # mdynamic-no-pic by default for executable and possibly static lib |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 # absolutified. Else, it's in the PATH (e.g. install_name_tool, ln). | 947 # absolutified. Else, it's in the PATH (e.g. install_name_tool, ln). |
945 if os.path.sep in shell_list[0]: | 948 if os.path.sep in shell_list[0]: |
946 shell_list[0] = gyp_path_to_build_path(shell_list[0]) | 949 shell_list[0] = gyp_path_to_build_path(shell_list[0]) |
947 | 950 |
948 # "script.sh" -> "./script.sh" | 951 # "script.sh" -> "./script.sh" |
949 if not os.path.sep in shell_list[0]: | 952 if not os.path.sep in shell_list[0]: |
950 shell_list[0] = os.path.join('.', shell_list[0]) | 953 shell_list[0] = os.path.join('.', shell_list[0]) |
951 postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list)) | 954 postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list)) |
952 | 955 |
953 return postbuilds | 956 return postbuilds |
OLD | NEW |