Skip to content

Commit

Permalink
Remove hard coded path to llvm-lit, it is installed by pip
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jul 21, 2024
1 parent bdd1cce commit 7a45d1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions suite/auto-sync/src/autosync/MCUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ def check_prerequisites(self, paths):
raise ValueError(
f"'{path}' does not exits or is not a directory. Cannot generate tests from there."
)
llvm_lit = get_path("{LLVM_LIT_BIN}")
if not llvm_lit.exists():
raise ValueError(
f"Could not find '{llvm_lit}'. Check {{LLVM_LIT_BIN}} in path_vars.json."
)
llvm_lit_cfg = get_path("{LLVM_LIT_TEST_DIR}")
if not llvm_lit_cfg.exists():
raise ValueError(
Expand Down Expand Up @@ -271,10 +266,9 @@ def run_llvm_lit(self, paths: list[Path]) -> list[LLVM_MC_Command]:
Calls llvm-lit with the given paths to the tests.
It parses the llvm-lit commands to LLVM_MC_Commands.
"""
llvm_lit = str(get_path("{LLVM_LIT_BIN}").absolute())
lit_cfg_dir = get_path("{LLVM_LIT_TEST_DIR}")
llvm_lit_cfg = str(lit_cfg_dir.absolute())
args = [llvm_lit, "-v", "-a", llvm_lit_cfg]
args = ["lit", "-v", "-a", llvm_lit_cfg]
for i, p in enumerate(paths):
slink = lit_cfg_dir.joinpath(f"{self.test_dir_link_prefix}{i}")
self.symbolic_links.append(slink)
Expand Down
1 change: 0 additions & 1 deletion suite/auto-sync/src/autosync/path_vars.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"{LLVM_TARGET_DIR}": "{LLVM_ROOT}/llvm/lib/Target/",
"{LLVM_MC_TEST_DIR}": "{LLVM_ROOT}/llvm/test/MC/",
"{LLVM_TBLGEN_BIN}": "{LLVM_ROOT}/build/bin/llvm-tblgen",
"{LLVM_LIT_BIN}": "{CS_ROOT}/.venv/bin/lit",
"{LLVM_LIT_TEST_DIR}": "{AUTO_SYNC_SRC}/lit_config/",
"{LLVM_INCLUDE_DIR}": "{LLVM_ROOT}/llvm/include/",
"{VENDOR_DIR}": "{AUTO_SYNC_ROOT}/vendor/",
Expand Down

0 comments on commit 7a45d1d

Please sign in to comment.