Skip to content

Commit 57255ce

Browse files
authored
[SYCL] Allow library mismatch for libdevice host object on Win32 (#5048)
VC++ yvals.h header file sets up linker directives like this: /FAILIFMISMATCH:RuntimeLibrary=MT_StaticRelease This will break linking, if the final standard libraries linked to the program have different configuration. Since the host part of libdevice objects is empty, we do not care about the mismatch checking. Signed-off-by: jinge90 <[email protected]>
1 parent cabb43f commit 57255ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ set(compile_opts
2727
-sycl-std=2017
2828
)
2929

30+
if (WIN32)
31+
list(APPEND compile_opts -D_ALLOW_RUNTIME_LIBRARY_MISMATCH)
32+
endif()
33+
3034
set(devicelib-obj-file ${obj_binary_dir}/libsycl-crt.${lib-suffix})
3135
add_custom_command(OUTPUT ${devicelib-obj-file}
3236
COMMAND ${clang} -fsycl -c

0 commit comments

Comments
 (0)