[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD
Chris Bieneman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 16 09:08:15 PDT 2021
beanz added a comment.
In D89942#2629184 <https://reviews.llvm.org/D89942#2629184>, @tbaeder wrote:
> But that's not true. The `3-stage-base.cmake` sets `BOOTSTRAP_LLVM_ENABLE_LTO` to `ON`, which doesn't work on SystemZ. This is the initial problem I had. I was not interested in having LTO enabled or not, but the cache enables it and that breaks on SystemZ.
Right, and my point is that the problem is `3-stage-base` setting that value. The caches are effectively user presets for build configurations. If the preset is broken, we shouldn't work around that in the build system.
> I vaguely remember trying to do all this in the `3-stage-base.cmake` but things like `LLVM_NATIVE_ARCH` etc. are not available in there, I am not sure if the previous `if(APPLE)` check was working either.
The `APPLE` check definitely works. That value is set by CMake before loading cache values, and that should not be removed from the cache file.
You can dump this blurb at the top of the CMake cache to see what variables are defined:
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
Between the variables CMake sets there and possibly shelling out to uname, is there really nothing you can key off?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89942/new/
https://reviews.llvm.org/D89942
More information about the cfe-commits
mailing list