| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """This script is used to download prebuilt clang binaries. | 6 """This script is used to download prebuilt clang binaries. |
| 7 | 7 |
| 8 It is also used by package.py to build the prebuilt clang binaries.""" | 8 It is also used by package.py to build the prebuilt clang binaries.""" |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 def GetVSVersion(): | 329 def GetVSVersion(): |
| 330 global vs_version | 330 global vs_version |
| 331 if vs_version: | 331 if vs_version: |
| 332 return vs_version | 332 return vs_version |
| 333 | 333 |
| 334 # Try using the toolchain in depot_tools. | 334 # Try using the toolchain in depot_tools. |
| 335 # This sets environment variables used by SelectVisualStudioVersion below. | 335 # This sets environment variables used by SelectVisualStudioVersion below. |
| 336 sys.path.append(os.path.join(CHROMIUM_DIR, 'build')) | 336 sys.path.append(os.path.join(CHROMIUM_DIR, 'build')) |
| 337 import vs_toolchain | 337 import vs_toolchain |
| 338 vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() | 338 vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() |
| 339 import mac_toolchain |
| 340 mac_toolchain.SetEnvironment() |
| 339 | 341 |
| 340 # Use gyp to find the MSVS installation, either in depot_tools as per above, | 342 # Use gyp to find the MSVS installation, either in depot_tools as per above, |
| 341 # or a system-wide installation otherwise. | 343 # or a system-wide installation otherwise. |
| 342 sys.path.append(os.path.join(CHROMIUM_DIR, 'tools', 'gyp', 'pylib')) | 344 sys.path.append(os.path.join(CHROMIUM_DIR, 'tools', 'gyp', 'pylib')) |
| 343 import gyp.MSVSVersion | 345 import gyp.MSVSVersion |
| 344 vs_version = gyp.MSVSVersion.SelectVisualStudioVersion( | 346 vs_version = gyp.MSVSVersion.SelectVisualStudioVersion( |
| 345 vs_toolchain.GetVisualStudioVersion()) | 347 vs_toolchain.GetVisualStudioVersion()) |
| 346 return vs_version | 348 return vs_version |
| 347 | 349 |
| 348 | 350 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 args.force_local_build = True | 789 args.force_local_build = True |
| 788 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 790 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 789 # Only build the Android ASan rt on ToT bots when targetting Android. | 791 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 790 args.with_android = False | 792 args.with_android = False |
| 791 | 793 |
| 792 return UpdateClang(args) | 794 return UpdateClang(args) |
| 793 | 795 |
| 794 | 796 |
| 795 if __name__ == '__main__': | 797 if __name__ == '__main__': |
| 796 sys.exit(main()) | 798 sys.exit(main()) |
| OLD | NEW |