1--- a/pylib/gyp/xcode_emulation.py
2+++ b/pylib/gyp/xcode_emulation.py
3@@ -1470,7 +1470,8 @@
4 sdk_root = xcode_settings._SdkRoot(configuration)
5 if not sdk_root:
6 sdk_root = xcode_settings._XcodeSdkPath('')
7- env['SDKROOT'] = sdk_root
8+ if sdk_root:
9+ env['SDKROOT'] = sdk_root
10
11 if not additional_settings:
12 additional_settings = {}