[ATfL][build.sh] Help CMake to pass the COMPILER_RT_TARGET_HAS_ATOMICS test - #1047
Open
pawosm-arm wants to merge 1 commit into
Open
pawosm-arm wants to merge 1 commit into
pawosm-arm wants to merge 1 commit into
Conversation
pawosm-arm
force-pushed
the
users/pawosm-arm/atfl-help-with-atomics
branch
from
September 16, 2026 16:04
35d4f5b to
d783624
Compare
Contributor
Author
|
Rebased and adjusted to the most recent changes. |
Contributor
Author
|
I need to rework this patch. I should have spotted this sooner in the CMake files...: This suggests which unexposed problem should be addressed first. |
…S test
The product_build/runtimes/runtimes-bins/CMakeCache.txt file generated
by CMake insists that there are no atomics in the compiler-rt library:
//Test COMPILER_RT_TARGET_HAS_ATOMICS
COMPILER_RT_TARGET_HAS_ATOMICS:INTERNAL=
This is due to a failing test which does not actually link the compiler-rt
library, which results in a linker error and failed CMake test:
ld.lld: error: undefined symbol: __aarch64_cas8_acq_rel
>>> referenced by src.cxx
>>> CMakeFiles/cmTC_7f91d.dir/src.cxx.o:(main)
ld.lld: error: undefined symbol: __aarch64_ldadd8_acq_rel
>>> referenced by src.cxx
>>> CMakeFiles/cmTC_7f91d.dir/src.cxx.o:(main)
>>> referenced by src.cxx
>>> CMakeFiles/cmTC_7f91d.dir/src.cxx.o:(main)
clang++: error: linker command failed with exit code 1
See product_build/runtimes/runtimes-bins/CMakeFiles/CMakeConfigureLog.yaml
for a complete log.
This causes a cascade of subtle problems down the line, including
faulty PGO instrumentation code being injected into instrumented
binaries, which causes race condidtions whenever the instrumented
code is multi-threaded.
This patch helps linking the compiler-rt library when building the
runtimes.
Note that for this patch to have any effect, a companion upstream PR
needs to be merged which fixes a bug in the
compiler-rt/cmake/config-ix.cmake file.
pawosm-arm
force-pushed
the
users/pawosm-arm/atfl-help-with-atomics
branch
from
September 17, 2026 22:49
d783624 to
a60ccac
Compare
Contributor
Author
That's not all, and that's not even a stopper. The real bug also needs to be fixed and I've positively tested a fix. I'll open an upstream PR soon(-ish). |
Contributor
Author
|
The upstream part has been merged: llvm/llvm-project#224681 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The product_build/runtimes/runtimes-bins/CMakeCache.txt file generated
by CMake insists that there are no atomics in the compiler-rt library:
//Test COMPILER_RT_TARGET_HAS_ATOMICS
COMPILER_RT_TARGET_HAS_ATOMICS:INTERNAL=
This is due to a failing test which does not actually link the compiler-rt
library, which results in a linker error and failed CMake test:
See product_build/runtimes/runtimes-bins/CMakeFiles/CMakeConfigureLog.yaml
for a complete log.
This causes a cascade of subtle problems down the line, including
faulty PGO instrumentation code being injected into instrumented
binaries, which causes race condidtions whenever the instrumented
code is multi-threaded.
This patch helps linking the compiler-rt library when building the
runtimes.
Note that for this patch to have any effect, a companion upstream PR
needs to be merged which fixes a bug in the
compiler-rt/cmake/config-ix.cmake file: llvm/llvm-project#224681