Skip to content

Commit

Permalink
Merge "install-build-deps: Add options to override autodetected platf…
Browse files Browse the repository at this point in the history
…orm" into main
  • Loading branch information
LalitMaganti authored and Gerrit Code Review committed Oct 12, 2023
2 parents 747df23 + 3d44ed9 commit 0bb49ab
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tools/install-build-deps
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,22 @@ def Main():
parser.add_argument('--verify', help='Check all URLs', action='store_true')
parser.add_argument(
'--no-toolchain', help='Do not download toolchain', action='store_true')
parser.add_argument(
'--build-os',
default=system().lower(),
choices=['windows', 'darwin', 'linux'],
help='Override the autodetected build operating system')
parser.add_argument(
'--build-arch',
default=GetArch(),
choices=['arm64', 'x64'],
help='Override the autodetected build CPU architecture')
args = parser.parse_args()
if args.verify:
CheckHashes()
return 0

target_os = system().lower()
target_os = args.build_os
if args.ui and target_os == 'windows':
print('Building the UI on Windows is unsupported')
return 1
Expand All @@ -680,7 +690,7 @@ def Main():
RmtreeIfExists(os.path.join(ROOT_DIR, old_dir))

for dep in deps:
target_arch = GetArch()
target_arch = args.build_arch
matches_os = dep.target_os == 'all' or target_os == dep.target_os
matches_arch = dep.target_arch == 'all' or target_arch == dep.target_arch
if not matches_os or not matches_arch:
Expand Down

0 comments on commit 0bb49ab

Please sign in to comment.