Skip to content

Commit

Permalink
Revert "fix(mux): fix proxying to unprefixed clang"
Browse files Browse the repository at this point in the history
This is apparently not enough, as multiple LLVM tools are also not
prefixed with target tuple, thus a more complete approach is needed.

This reverts commit fa6ab62.
  • Loading branch information
xen0n committed Oct 21, 2024
1 parent 739c04b commit aa5b66d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions ruyi/mux/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ def mux_main(argv: List[str]) -> int | NoReturn:
if basename == "ruyi-qemu":
return mux_qemu_main(argv, vcfg)

is_unprefixed_clang = is_proxying_to_unprefixed_clang(basename)
# match the basename with one of the configured target tuples
target_tuple: str | None = None
toolchain_bindir: str | None = None
toolchain_sysroot: str | None = None
gcc_install_dir: str | None = None
for tgt_tuple, tgt_data in vcfg.targets.items():
if not basename.startswith(f"{tgt_tuple}-"):
# Unprefixed Clang should be treated as having the "default"
# target tuple.
if not is_unprefixed_clang:
continue
continue

log.D(f"matched target '{tgt_tuple}', data {tgt_data}")
target_tuple = tgt_tuple
Expand Down Expand Up @@ -137,10 +133,6 @@ def is_proxying_to_clang(basename: str) -> bool:
return "clang" in basename


def is_proxying_to_unprefixed_clang(basename: str) -> bool:
return basename in ("clang", "clang++")


def mux_qemu_main(argv: List[str], vcfg: RuyiVenvConfig) -> int | NoReturn:
binpath = vcfg.qemu_bin
if binpath is None:
Expand Down

0 comments on commit aa5b66d

Please sign in to comment.