Skip to content

Commit ae0c6cc

Browse files
gen_coverage can deal with both 2024 and 2023 layouts
1 parent b814f53 commit ae0c6cc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/gen_coverage.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ def find_objects():
196196
args.compiler_root = None
197197
icx_path = subprocess.check_output(["which", "icx"])
198198
bin_dir = os.path.dirname(icx_path)
199-
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "compiler")
199+
compiler_dir = os.path.join(bin_dir.decode("utf-8"), "compiler")
200+
if os.path.exists(compiler_dir):
201+
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "compiler")
202+
else:
203+
bin_dir = os.path.dirname(bin_dir)
204+
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "bin-llvm")
205+
assert os.path.exists(args.bin_llvm)
200206
else:
201207
args_to_validate = [
202208
"c_compiler",

0 commit comments

Comments
 (0)