-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Use LLVM runtimes build #60993
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
Use LLVM runtimes build #60993
Conversation
LLVM plans to remove the legacy methods for building compiler-rt. This change updates build-script to use LLVM_ENABLE_RUNTIMES to build compiler-rt with the just-built clang instead of the legacy methods. (cherry picked from commit 6386f60)
@swift-ci please build toolchain |
@swift-ci please test |
@swift-ci please test |
@swift-ci please build toolchain |
@swift-ci Please Test Source Compatibility Release |
It looks like under Linux we started detecting i386 as an architecture we can build for, and then we stumble finding missing headers/libraries
Trying to figure out why that's the case. |
@swift-ci please test |
@swift-ci please test Linux |
Figured out the failure was due to the fact that the configuration of builtins compiles archives to detect compiler features, and so we assume we can compile for x86 even if we miss the libraries on the bots |
@swift-ci please test |
Now hitting some troubles building
|
They will fail linking since we are not building the runtimes with `-Wl,-z,defs`, which will fail in presence of undefined symbols in the final `libclang_rt.tsan` library.
@swift-ci please test |
The failure seems to be caused by the fact that with the runtimes builds we are now linking the sanitizer libraries with |
Getting another regression in Linux when running integration tests
|
@swift-ci please test Linux |
@swift-ci please test Linux |
@swift-ci please test |
@swift-ci Please Test Source Compatibility Release |
@swift-ci please build toolchain |
@swift-ci please test Apple Silicon |
@swift-ci Please ASAN test |
@swift-ci Please test CentOS 7 platform |
@swift-ci Please test CentOS 8 platform |
@swift-ci Please test Amazon Linux 2 platform |
Just realized now that Tackling this in #61435 |
# We are now inheriting the -Wl,-z,defs linker flags | ||
# from HandleLLVMOptions.cmake, so the compiler now complains | ||
# for BlocksRuntime symbols that are undefined | ||
-DCOMPILER_RT_INTERCEPT_LIBDISPATCH:BOOL=OFF |
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.
This should not be turned off, otherwise we will break TSan. @edymtt
Can we fix the undefined references by linking the blocks runtime -fblocks
?
The CMake code here is trying to do this:
https://github.com/llvm/llvm-project/blob/f418f88824905c372cb9252b3f675012a3fc799d/compiler-rt/CMakeLists.txt#L172
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 can try explore that -- to the best of my understanding that is not present in CI nodes, and we are building that ourselves when we are building Swift, but likely I'm missing something
Duplicate of #67986 |
LLVM plans to remove the legacy methods for building compiler-rt. This change updates build-script to use LLVM_ENABLE_RUNTIMES to build compiler-rt with the just-built clang instead of the legacy methods.
(cherry picked from #58465 to double check my suggestion is sound)