-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL] Link and include LLVMSupport in SYCL library #16763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
a89edc6
4b479b2
cb78c5e
8eedefa
c8a5bf9
a1c5055
524e961
0a5c250
fb33872
03718f8
a485a81
8c98e5d
71b1abf
0d43f6c
1a45733
1a306df
e65e559
a909259
c25f17d
cd290c4
0653c17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,9 +90,7 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME) | |
| if (SYCL_ENABLE_STACK_PRINTING) | ||
| if(NOT MSVC OR (CMAKE_BUILD_TYPE STREQUAL "Debug" AND ARG_COMPILE_OPTIONS MATCHES ".*MDd.*") OR | ||
| (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT ARG_COMPILE_OPTIONS MATCHES ".*MDd.*")) | ||
| add_dependencies(${LIB_NAME} LLVMSupport) | ||
| target_compile_definitions(${LIB_OBJ_NAME} PUBLIC ENABLE_STACK_TRACE) | ||
| target_link_libraries(${LIB_NAME} PRIVATE LLVMSupport) | ||
| endif() | ||
| endif() | ||
|
|
||
|
|
@@ -187,6 +185,18 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME) | |
| endif() | ||
| endif() | ||
|
|
||
| # Link with LLVMSupport for shared utilities. | ||
| add_dependencies(${LIB_NAME} LLVMSupport) | ||
| target_link_libraries(${LIB_NAME} PRIVATE LLVMSupport) | ||
| target_include_directories(${LIB_OBJ_NAME} SYSTEM PRIVATE ${LLVM_MAIN_INCLUDE_DIR}) | ||
| target_compile_definitions(${LIB_OBJ_NAME} PRIVATE LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1) | ||
steffenlarsen marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| if (NOT MSVC) | ||
|
||
| # LLVM library increases the size of the SYCL library quite significantly | ||
| # without the following link options. | ||
| target_link_options(${LIB_NAME} PRIVATE -Wl,--gc-sections) | ||
| endif() | ||
|
|
||
| if(SYCL_ENABLE_EXTENSION_JIT) | ||
| if(NOT DEFINED LLVM_EXTERNAL_SYCL_JIT_SOURCE_DIR) | ||
| message(FATAL_ERROR "Undefined LLVM_EXTERNAL_SYCL_JIT_SOURCE_DIR variable: Must be set when extension to JIT SYCL kernels is enabled") | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.