Skip to content

Commit d1441e8

Browse files
authored
[SYCL][CMake] Build sycl-toolchain by default (#13550)
In compile.py we are using -t sycl-toolchain to build the sycl toolchain. However, sycl-toolchain is not added by default target. So when I configure the project , then build the default target, eg: `ninja` some of the libs eg: libdevice will not be built even if they are in the "LLVM_ENABLE_PROJECTS" list. eg: One of the typical failures are missing sycl-devicelib-host. ``` /iusers/jinsongj/llvm/build/bin/clang++ -fsycl -fsycl-targets=spir64 /iusers/jinsongj/llvm/sycl/test-e2e/Matrix/XMX8/element_wise_abc.cpp $ /iusers/jinsongj/llvm/build/bin/clang++ -fsycl -fsycl-targets=spir64 /iusers/jinsongj/llvm/sycl/test-e2e/Matrix/XMX8/element_wise_abc.cpp /usr/bin/ld: cannot find -lsycl-devicelib-host: No such file or directory clang++: error: linker command failed with exit code 1 (use -v to see invocation) ``` So I have to run `ninja sycl-toolchain` again to build sycl toolchain. Since sycl branch is for sycl-toolchain, I think we should enable building sycl-toolchain by default.
1 parent d962d3c commit d1441e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ add_custom_target( sycl-runtime-libraries
343343
DEPENDS ${SYCL_RT_LIBS}
344344
)
345345

346-
add_custom_target( sycl-toolchain
346+
add_custom_target( sycl-toolchain ALL
347347
DEPENDS sycl-runtime-libraries
348348
sycl-compiler
349349
sycl-ls

0 commit comments

Comments
 (0)