llvm
llvm copied to clipboard
[SYCL][UR][CMake] Stop creating debug library builds on Windows during release builds
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=MultiThreadedDebugDLL can 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.