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

Side by Side Diff: build/config/mac/sdk_info.py

Issue 2183053006: Add mac hermetic support to build/config/mac/sdk_info.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wrap ios toolchain in is_ios block Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. 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 import os 5 import os
6 import subprocess 6 import subprocess
7 import sys 7 import sys
8 8
9 sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
10 import mac_toolchain
11
9 # This script prints information about the build system, the operating 12 # This script prints information about the build system, the operating
10 # system and the iOS or Mac SDK (depending on the platform "iphonesimulator", 13 # system and the iOS or Mac SDK (depending on the platform "iphonesimulator",
11 # "iphoneos" or "macosx" generally). 14 # "iphoneos" or "macosx" generally).
12 # 15 #
13 # In the GYP build, this is done inside GYP itself based on the SDKROOT 16 # In the GYP build, this is done inside GYP itself based on the SDKROOT
14 # variable. 17 # variable.
15 18
16 def FormatVersion(version): 19 def FormatVersion(version):
17 """Converts Xcode version to a format required for Info.plist.""" 20 """Converts Xcode version to a format required for Info.plist."""
18 version = version.replace('.', '') 21 version = version.replace('.', '')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 settings['sdk_build'] = settings['sdk_version'] 53 settings['sdk_build'] = settings['sdk_version']
51 54
52 55
53 if __name__ == '__main__': 56 if __name__ == '__main__':
54 if len(sys.argv) != 2: 57 if len(sys.argv) != 2:
55 sys.stderr.write( 58 sys.stderr.write(
56 'usage: %s [iphoneos|iphonesimulator|macosx]\n' % 59 'usage: %s [iphoneos|iphonesimulator|macosx]\n' %
57 os.path.basename(sys.argv[0])) 60 os.path.basename(sys.argv[0]))
58 sys.exit(1) 61 sys.exit(1)
59 62
63 # Try using the toolchain in mac_files.
64 mac_toolchain.SetToolchainEnvironment()
65
60 settings = {} 66 settings = {}
61 FillMachineOSBuild(settings) 67 FillMachineOSBuild(settings)
62 FillXcodeVersion(settings) 68 FillXcodeVersion(settings)
63 FillSDKPathAndVersion(settings, sys.argv[1], settings['xcode_version']) 69 FillSDKPathAndVersion(settings, sys.argv[1], settings['xcode_version'])
64 70
65 for key in sorted(settings): 71 for key in sorted(settings):
66 print '%s="%s"' % (key, settings[key]) 72 print '%s="%s"' % (key, settings[key])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698