-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[windows][toolchain] Enable builtins and sanitizers #77770
[windows][toolchain] Enable builtins and sanitizers #77770
Conversation
@hjyamauchi Great! I think this is ready to land. (Once I default-enabled them.) |
Let's give the CI a try. If it works, this can land. Please note: I'd like to squash commits before/while merging. |
@swift-ci please test |
@swift-ci please test Windows platform |
foreach(target ${LLVM_RUNTIME_TARGETS}) | ||
set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES | ||
compiler-rt | ||
CACHE STRING "") | ||
set(RUNTIMES_${target}_CMAKE_MT mt CACHE STRING "") | ||
set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Windows CACHE STRING "") | ||
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "") | ||
set(RUNTIMES_${target}_COMPILER_RT_BUILD_BUILTINS YES CACHE BOOL "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly worried about this as this is the "legacy" path - the builtins build I thought was being replaced with the runtimes build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding was that this option lets the runtimes build include llvm-project\compiler-rt\lib\builtins
which results in a builtins-<triple>
build-tree next to the runtimes-<triple>
one in the runtimes
build directory. I don't see a deprecation warning in CMake, neither swiftlang not upstream https://github.com/llvm/llvm-project/blob/c9fbabfdc92f12b2b0148762e6e789157a172e4d/compiler-rt/lib/CMakeLists.txt#L16 I might be wrong though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, double-checked: I should should switch this off as we get duplicate build artifacts in:
runtimes\runtimes-x86_64-unknown-windows-msvc-bins\compiler-rt\lib\builtins
runtimes\builtins-x86_64-unknown-windows-msvc-bins
The Windows tests failed, because the patch implicitly enabled 9 previously unsupported tests in Swift. 3 of them pass, but the others fail:
|
I set all failing tests to UNSUPPORTED on Windows. @hjyamauchi Can we give this another try as well please? IRGen/address_sanitizer_use_odr_indicator.swift appears to have failed with an ODR-related mangling issue. All the others failed because the driver seems to reject the
|
@swift-ci please test Windows platform |
@swift-ci please smoke test |
The Windows CI seems to have this (unrelated) issue at the moment.
|
|
@swift-ci please test Windows platform |
@swift-ci please smoke test Linux platform |
@swift-ci please test Windows platform |
Profile and builtin libraries from compiler-rt are static and do not require a link step. We can enable them in our CMake caches and we can build and install them in the unified LLVM build step. Sanitizers contain dynamic libraries. We need the target-specific Visual Studio shell to perform the link step. This patch adds extra build steps in build.ps1 that reconfigure, build and install the target-specific build-trees in the LLVM runtimes directory through their respective Visual Studio shells.