Skip to content

Commit

Permalink
set default of cross prefix for different machines to make it clearer
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Jul 23, 2024
1 parent c2bc815 commit bf8cda0
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions scripts/tests
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,14 @@ def base_compile(
s += f"{k}={v} "
return s

if platform.machine() == "x86_64":
logging.debug(f"Cross compiling {bin}")
logging.debug(f"Compiling {bin}...")
args = [
"make",
f"CROSS_PREFIX={cross_prefix}",
f"{bin}",
] + extra_make_args

args = [
"make",
f"CROSS_PREFIX={cross_prefix}",
f"{bin}",
] + extra_make_args

else:
logging.debug(f"Compiling {bin} natively")

args = ["make", f"{bin}"] + extra_make_args
logging.info(dict2str(extra_make_envs) + " ".join(args))
logging.info(dict2str(extra_make_envs) + " ".join(args))

p = subprocess.run(
args,
Expand Down Expand Up @@ -244,8 +238,8 @@ _shared_options = [
click.option(
"-cp",
"--cross-prefix",
default="aarch64-unknown-linux-gnu-" if platform.machine() == "x86_64" else " ",
show_default=True,
default="aarch64-unknown-linux-gnu-",
hidden=platform.machine() != "x86_64",
nargs=1,
help="Cross prefix for compilation on non-aarch64 machines",
Expand Down

0 comments on commit bf8cda0

Please sign in to comment.