tools/build/make.py: Grow the list of MI targets

This commit is contained in:
Jessica Clarke 2023-08-22 18:53:13 +01:00
parent 3b4da25ead
commit 5157b451c6

View File

@ -48,6 +48,24 @@
from pathlib import Path
# List of targets that are independent of TARGET/TARGET_ARCH and thus do not
# need them to be set. Keep in the same order as Makefile documents them (if
# they are documented).
mach_indep_targets = [
"cleanuniverse",
"universe",
"universe-toolchain",
"tinderbox"
"worlds",
"kernels",
"kernel-toolchains",
"targets",
"toolchains",
"makeman",
"sysent",
]
def run(cmd, **kwargs):
cmd = list(map(str, cmd)) # convert all Path objects to str
debug("Running", cmd)
@ -190,7 +208,7 @@ def default_cross_toolchain():
new_env_vars = {}
if not sys.platform.startswith("freebsd"):
if not is_make_var_set("TARGET") or not is_make_var_set("TARGET_ARCH"):
if "universe" not in sys.argv and "tinderbox" not in sys.argv:
if not set(sys.argv).intersection(set(mach_indep_targets)):
sys.exit("TARGET= and TARGET_ARCH= must be set explicitly "
"when building on non-FreeBSD")
if not parsed_args.bootstrap_toolchain: