Skip to content

Commit 8ceacaa

Browse files
committed
Return abs paths for C/C++ compilers from resolve_compilers() helper function when --c-compiler/--cxx-compiler passed to build scripts
1 parent 04abc2a commit 8ceacaa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/_build_helper.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def resolve_compilers(
8585
if cxx_compiler is None:
8686
cxx_compiler = "icpx" if is_linux else "icx"
8787

88+
compiler_paths = []
8889
for name, opt_name in (
8990
(c_compiler, "--c-compiler"),
9091
(cxx_compiler, "--cxx-compiler"),
@@ -93,9 +94,14 @@ def resolve_compilers(
9394
path = name
9495
else:
9596
path = os.path.join(compiler_root, name)
97+
9698
if not os.path.exists(path):
97-
raise RuntimeError(f"{opt_name} value {name} not found")
98-
return c_compiler, cxx_compiler
99+
raise RuntimeError(
100+
f"{opt_name} value {name} not found and {path} not exist"
101+
)
102+
103+
compiler_paths.append(path)
104+
return tuple(compiler_paths)
99105

100106

101107
def resolve_onemath(

0 commit comments

Comments
 (0)