@@ -162,7 +162,7 @@ sub init_test
162
162
if (defined $ENV {BASECOMPILER }) {
163
163
$compiler_path = $ENV {BASECOMPILER };
164
164
} else {
165
- $compiler_path = generate_tool_path(" dpcpp " , " clang++" );
165
+ $compiler_path = generate_tool_path(" icx " , " clang++" );
166
166
}
167
167
168
168
my $branch = " " ;
@@ -697,7 +697,13 @@ sub set_tool_path
697
697
698
698
# For the product compiler, add the internal "bin-llvm" directory to PATH.
699
699
if ($compiler =~ / xmain/ ) {
700
- my $llvm_dir = dirname(qx/ dpcpp -print-prog-name=llvm-ar/ );
700
+ my $llvm_dir = " " ;
701
+ if ($cmplr_platform {OSFamily } eq " Windows" ) {
702
+ $llvm_dir = dirname(qx/ which llvm-ar/ );
703
+ } else {
704
+ $llvm_dir = dirname(qx/ icx -print-prog-name=llvm-ar/ );
705
+ }
706
+ chomp $llvm_dir ;
701
707
my $llvm_path = join ($path_sep , $llvm_dir , $ENV {PATH });
702
708
set_envvar(" PATH" , $llvm_path , join ($path_sep , $llvm_dir , ' $PATH' ));
703
709
}
@@ -819,13 +825,13 @@ sub generate_tool_path
819
825
my $driver = shift ;
820
826
my $tool_name = shift ;
821
827
822
- my $tool_path = qx/ $driver --print-prog-name=$tool_name / ;
823
- chomp $tool_path ;
824
-
828
+ my $tool_path ;
825
829
if ($cmplr_platform {OSFamily } eq " Windows" ) {
826
- $tool_path =~ tr # \\# /# ;
827
- $tool_path = " $tool_path .exe" ;
830
+ $tool_path = qx/ which $tool_name / ;
831
+ } else {
832
+ $tool_path = qx/ $driver --print-prog-name=$tool_name / ;
828
833
}
834
+ chomp $tool_path ;
829
835
830
836
return $tool_path ;
831
837
}
@@ -857,10 +863,10 @@ sub run_cmake
857
863
} else {
858
864
$c_cmplr = " clang" ;
859
865
$cpp_cmplr = ' clang++' ;
860
- # Clang is not guaranteed to be in PATH, but dpcpp is. Ask dpcpp
866
+ # Clang is not guaranteed to be in PATH, but icx is. Ask icx
861
867
# for absolute paths.
862
- $c_cmplr = generate_tool_path(" dpcpp " , $c_cmplr );
863
- $cpp_cmplr = generate_tool_path(" dpcpp " , $cpp_cmplr );
868
+ $c_cmplr = generate_tool_path(" icx " , $c_cmplr );
869
+ $cpp_cmplr = generate_tool_path(" icx " , $cpp_cmplr );
864
870
$c_cmd_opts = convert_opt($c_cmd_opts );
865
871
$cpp_cmd_opts = convert_opt($cpp_cmd_opts );
866
872
}
@@ -869,10 +875,10 @@ sub run_cmake
869
875
$c_cmplr = " clang" ;
870
876
if ($compiler =~ / xmain/ ) {
871
877
$cpp_cmplr = " clang++" ;
872
- # Clang is not guaranteed to be in PATH, but dpcpp is. Ask dpcpp
878
+ # Clang is not guaranteed to be in PATH, but icx is. Ask icx
873
879
# for absolute paths.
874
- $c_cmplr = generate_tool_path(" dpcpp " , $c_cmplr );
875
- $cpp_cmplr = generate_tool_path(" dpcpp " , $cpp_cmplr );
880
+ $c_cmplr = generate_tool_path(" icx " , $c_cmplr );
881
+ $cpp_cmplr = generate_tool_path(" icpx " , $cpp_cmplr );
876
882
}
877
883
$thread_opts = " -lpthread" ;
878
884
}
0 commit comments