Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2022)

Unified Diff: build/config/mac/sdk_info.py

Issue 2412353003: Remove direct references to hermetic mac toolchain. (Closed)
Patch Set: Remove unused import. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/config/mac/sdk_info.py
diff --git a/build/config/mac/sdk_info.py b/build/config/mac/sdk_info.py
index 52b252449aa1c884921541f4b49d488e4dc0cae9..e63ac0bd19b3128066d85089cd66251b55ba49a4 100644
--- a/build/config/mac/sdk_info.py
+++ b/build/config/mac/sdk_info.py
@@ -2,13 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import argparse
import os
import subprocess
import sys
-sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
-import mac_toolchain
-
# This script prints information about the build system, the operating
# system and the iOS or Mac SDK (depending on the platform "iphonesimulator",
# "iphoneos" or "macosx" generally).
@@ -54,19 +52,22 @@ def FillSDKPathAndVersion(settings, platform, xcode_version):
if __name__ == '__main__':
- if len(sys.argv) != 2:
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--developer_dir", required=False)
+ args, unknownargs = parser.parse_known_args()
+ if args.developer_dir:
+ os.environ['DEVELOPER_DIR'] = args.developer_dir
+
+ if len(unknownargs) != 1:
sys.stderr.write(
'usage: %s [iphoneos|iphonesimulator|macosx]\n' %
os.path.basename(sys.argv[0]))
sys.exit(1)
- # Try using the toolchain in mac_files.
- mac_toolchain.SetToolchainEnvironment()
-
settings = {}
FillMachineOSBuild(settings)
FillXcodeVersion(settings)
- FillSDKPathAndVersion(settings, sys.argv[1], settings['xcode_version'])
+ FillSDKPathAndVersion(settings, unknownargs[0], settings['xcode_version'])
for key in sorted(settings):
print '%s="%s"' % (key, settings[key])

Powered by Google App Engine
This is Rietveld 408576698