| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'): | 293 if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'): |
| 294 cflags.append('-fvisibility=hidden') | 294 cflags.append('-fvisibility=hidden') |
| 295 | 295 |
| 296 if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'): | 296 if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'): |
| 297 cflags.append('-Werror') | 297 cflags.append('-Werror') |
| 298 | 298 |
| 299 if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'): | 299 if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'): |
| 300 cflags.append('-Wnewline-eof') | 300 cflags.append('-Wnewline-eof') |
| 301 | 301 |
| 302 # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or |
| 303 # llvm-gcc. It also requires a fairly recent libtool, and |
| 304 # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the |
| 305 # path to the libLTO.dylib that matches the used clang. |
| 306 if self._Test('LLVM_LTO', 'YES', default='NO'): |
| 307 cflags.append('-flto') |
| 308 |
| 302 self._Appendf(cflags, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s') | 309 self._Appendf(cflags, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s') |
| 303 | 310 |
| 304 # TODO: | 311 # TODO: |
| 305 if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'): | 312 if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'): |
| 306 self._WarnUnimplemented('COPY_PHASE_STRIP') | 313 self._WarnUnimplemented('COPY_PHASE_STRIP') |
| 307 self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS') | 314 self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS') |
| 308 self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS') | 315 self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS') |
| 309 self._WarnUnimplemented('GCC_ENABLE_OBJC_GC') | 316 self._WarnUnimplemented('GCC_ENABLE_OBJC_GC') |
| 310 | 317 |
| 311 # TODO: This is exported correctly, but assigning to it is not supported. | 318 # TODO: This is exported correctly, but assigning to it is not supported. |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 # absolutified. Else, it's in the PATH (e.g. install_name_tool, ln). | 995 # absolutified. Else, it's in the PATH (e.g. install_name_tool, ln). |
| 989 if os.path.sep in shell_list[0]: | 996 if os.path.sep in shell_list[0]: |
| 990 shell_list[0] = gyp_path_to_build_path(shell_list[0]) | 997 shell_list[0] = gyp_path_to_build_path(shell_list[0]) |
| 991 | 998 |
| 992 # "script.sh" -> "./script.sh" | 999 # "script.sh" -> "./script.sh" |
| 993 if not os.path.sep in shell_list[0]: | 1000 if not os.path.sep in shell_list[0]: |
| 994 shell_list[0] = os.path.join('.', shell_list[0]) | 1001 shell_list[0] = os.path.join('.', shell_list[0]) |
| 995 postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list)) | 1002 postbuilds.append(gyp.common.EncodePOSIXShellList(shell_list)) |
| 996 | 1003 |
| 997 return postbuilds | 1004 return postbuilds |
| OLD | NEW |