2222
2323
2424def linux_native_cpu_toolchain_root () -> Path :
25- return Path (require_env ("RUNNER_TEMP" )) / "intel-nativecpu-toolchain" / "toolchain "
25+ return Path (require_env ("RUNNER_TEMP" )) / "intel-nativecpu-toolchain" / "build "
2626
2727
2828def linux_native_cpu_toolchain_ready (toolchain_root : Path ) -> bool :
2929 if not toolchain_root .exists ():
3030 return False
31- compiler_candidates = [toolchain_root / "bin" / "clang++" ]
31+ compiler_candidates = [
32+ toolchain_root / "bin" / "clang++" ,
33+ toolchain_root / "bin" / "compiler" / "clang++" ,
34+ ]
3235 has_compiler = any (path .exists () for path in compiler_candidates )
3336 has_runtime = find_file ([toolchain_root ], "libsycl.so" ) is not None or find_file (
3437 [toolchain_root ], "libsycl.so.9"
@@ -109,7 +112,7 @@ def build_linux_native_cpu_toolchain() -> Path:
109112
110113 toolchain_base = toolchain_root .parent
111114 source_dir = toolchain_base / "src"
112- build_dir = toolchain_base / "build"
115+ build_dir = toolchain_root
113116 llvm_tag = require_env ("INTEL_LLVM_TAG" )
114117
115118 toolchain_base .mkdir (parents = True , exist_ok = True )
@@ -152,7 +155,6 @@ def build_linux_native_cpu_toolchain() -> Path:
152155 "-DCMAKE_CXX_COMPILER=g++-13" ,
153156 "-DCMAKE_C_COMPILER_LAUNCHER=ccache" ,
154157 "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" ,
155- f"-DCMAKE_INSTALL_PREFIX={ toolchain_root } " ,
156158 "-DSYCL_ENABLE_BACKENDS=native_cpu" ,
157159 "-DSYCL_INCLUDE_TESTS=OFF" ,
158160 "-DLLVM_INSTALL_UTILS=ON" ,
@@ -161,21 +163,11 @@ def build_linux_native_cpu_toolchain() -> Path:
161163 )
162164
163165 run (["cmake" , "--build" , str (build_dir ), "--target" , "sycl-toolchain" , "--parallel" ])
164- run (
165- [
166- "cmake" ,
167- "--install" ,
168- str (build_dir / "runtimes" / "runtimes-bins" ),
169- "--prefix" ,
170- str (toolchain_root ),
171- ]
172- )
173- run (["cmake" , "--build" , str (build_dir ), "--target" , "deploy-sycl-toolchain" , "--parallel" ])
174166
175167 if not linux_native_cpu_toolchain_ready (toolchain_root ):
176168 main_error (
177169 "Intel SYCL native_cpu toolchain build completed, but required files "
178- "were not deployed into the toolchain directory "
170+ "were not produced in the build tree "
179171 )
180172
181173 write_env ("SYCL_ROOT" , str (toolchain_root ))
0 commit comments