[SYCL][UR][CMake] Stop creating debug library builds on Windows during release builds#18200
[SYCL][UR][CMake] Stop creating debug library builds on Windows during release builds#18200steffenlarsen wants to merge 47 commits intointel:syclfrom
Conversation
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
| set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS OFF) | ||
|
|
||
| set(CMAKE_MSVC_RUNTIME_LIBRARY_BAK "${CMAKE_MSVC_RUNTIME_LIBRARY}") | ||
| # UMF has not yet been able to build as static |
There was a problem hiding this comment.
@kbenzie - Do you know if this is still a problem? I was able to build in static configuration locally without any issues.
There was a problem hiding this comment.
I think that's a question for a UMF maintainer @bratpiorka
There was a problem hiding this comment.
I'm not sure what is behind this comment, but since everything is working now, that's great
| if (SYCL_ENABLE_XPTI_TRACING) | ||
| target_link_libraries(${LIB_NAME} PRIVATE ${CMAKE_DL_LIBS}) | ||
| target_link_libraries(${LIB_TARGET_NAME} PRIVATE ${CMAKE_DL_LIBS}) | ||
| endif() |
There was a problem hiding this comment.
l201. should it be LIB_TARGET_NAME too?
There was a problem hiding this comment.
Yes! Good catch.
| # Version-agnostic name of the import library, has effect on Windows only. | ||
| set(IMPLIB_NAME "sycl") | ||
| set(IMPLIB_PREVIEW_NAME "${IMPLIB_NAME}-preview") | ||
| if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_MSVC_RUNTIME_LIBRARY STREQUAL MultiThreadedDebugDLL) |
There was a problem hiding this comment.
do we not have "if (WIN32)" or similar check here because we apply this setting in add_sycl_rt_library for windows only? can we just set IMPLIB_* vars at l348 and do changes in the win path together with other name related vars?
There was a problem hiding this comment.
do we not have "if (WIN32)" or similar check here because we apply this setting in add_sycl_rt_library for windows only?
Exactly!
can we just set IMPLIB_* vars at l348 and do changes in the win path together with other name related vars?
We could, e.g. by moving the first sets here to before the if (WIN32), but it does make the fact that this just appends a d to the names a little less obvious. If you think it is better I will happily do it though. 👍
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
|
Closing while this gets reassigned to someone who has time to maintain it. |
Currently the SYCL library and its constituents build both a release build and a debug build (/MDd) on Windows, no matter what the build type is. This PR changes the build to only build in the mode specified by the CMAKE_BUILD_TYPE, meaning that packaging of release builds must build both explicitly and copy the files into the packages.
To allow parity with old builds, the
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLLcan be used during configuration to use the debug UCRT in release mode, generating "d"-suffixed libraries. This can also be controlled in the configure.py script using the --use-debug-crt-dll option.Additionally, this PR adds a new test that checks that library files in build mode all have the required postfix ("d" or "d-preview") when they link with Windows debug URCT, and the release variant if not.