Chromium Code Reviews| Index: pylib/gyp/xcode_emulation.py |
| diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py |
| index 4f10ae301bce4004e06fe53ac7d94e094f09d6b9..e2ad93246b8d3630ebabcb7b029445b9920d8ec9 100644 |
| --- a/pylib/gyp/xcode_emulation.py |
| +++ b/pylib/gyp/xcode_emulation.py |
| @@ -330,7 +330,7 @@ class XcodeSettings(object): |
| cflags = [] |
| sdk_root = self._SdkPath() |
| - if sdk_root: |
| + if 'SDKROOT' in self._Settings() and sdk_root: |
| cflags.append('-isysroot %s' % sdk_root) |
| if self._Test('CLANG_WARN_CONSTANT_CONVERSION', 'YES', default='NO'): |
| @@ -639,7 +639,7 @@ class XcodeSettings(object): |
| self._AppendPlatformVersionMinFlags(ldflags) |
| - if self._SdkPath(): |
| + if 'SDKROOT' in self._Settings() and self._SdkPath(): |
| ldflags.append('-isysroot ' + self._SdkPath()) |
| for library_path in self._Settings().get('LIBRARY_SEARCH_PATHS', []): |
| @@ -860,9 +860,8 @@ class XcodeSettings(object): |
| else: |
| l = library |
| - if self._SdkPath(): |
| - sdk_root = self._SdkPath(config_name) |
| - else: |
| + sdk_root = self._SdkPath(config_name) |
| + if not sdk_root: |
|
Nico
2013/12/24 19:16:21
`sdk_root is None` maybe?
|
| sdk_root = '' |
| return l.replace('$(SDKROOT)', sdk_root) |