diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-05 21:50:09 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-05 21:50:09 +0000 |
commit | b53332396f09e0fe183e686ca20cdfebf24c67fc (patch) | |
tree | 1b3b61a08e7006209329eb44e429480a2f0128d9 /chrome/tools/build | |
parent | 22846bfdf3ee13ebbc3469d06bea88a63854fb30 (diff) | |
download | chromium_src-b53332396f09e0fe183e686ca20cdfebf24c67fc.zip chromium_src-b53332396f09e0fe183e686ca20cdfebf24c67fc.tar.gz chromium_src-b53332396f09e0fe183e686ca20cdfebf24c67fc.tar.bz2 |
Don't pass SDKROOT to ibtool.
Review URL: https://codereview.chromium.org/11026078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/build')
-rwxr-xr-x | chrome/tools/build/mac/generate_localizer | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/tools/build/mac/generate_localizer b/chrome/tools/build/mac/generate_localizer index c0b8dc0..9c00927 100755 --- a/chrome/tools/build/mac/generate_localizer +++ b/chrome/tools/build/mac/generate_localizer @@ -42,8 +42,19 @@ def xib_localizable_strings(xib_path): """Runs ibtool to extract the localizable strings data from the xib.""" tools_dir = os.environ.get('DEVELOPER_BIN_DIR', '/usr/bin') tool_path = os.path.join(tools_dir, 'ibtool') + + # Take SDKROOT out of the environment passed to ibtool. ibtool itself has + # no need for it, but when ibtool runs via xcrun and Xcode isn't aware of + # the SDK in use, its presence causes an error. + if 'SDKROOT' in os.environ: + ibtool_env = os.environ.copy() + del ibtool_env['SDKROOT'] + else: + ibtool_env = os.environ + ibtool_cmd = subprocess.Popen([tool_path, '--localizable-strings', xib_path], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout=subprocess.PIPE, stderr=subprocess.PIPE, + env=ibtool_env) (cmd_out, cmd_err) = ibtool_cmd.communicate() if ibtool_cmd.returncode: sys.stderr.write('%s:0: error: ibtool on "%s" failed (%d):\n%s\n' % |