[all-commits] [llvm/llvm-project] 529a79: Reapply #2 of [runtimes] Fix building initial libu...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Thu Dec 9 11:40:19 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 529a79302bf35f9a5822cc00395bba99f3575e30
https://github.com/llvm/llvm-project/commit/529a79302bf35f9a5822cc00395bba99f3575e30
Author: Martin Storsjö <martin at martin.st>
Date: 2021-12-09 (Thu, 09 Dec 2021)
Changed paths:
M libcxx/CMakeLists.txt
M libcxx/cmake/config-ix.cmake
M runtimes/CMakeLists.txt
Log Message:
-----------
Reapply #2 of [runtimes] Fix building initial libunwind+libcxxabi+libcxx with compiler implied -lunwind
This does mostly the same as D112126, but for the runtimes cmake files.
Most of that is straightforward, but the interdependency between
libcxx and libunwind is tricky:
Libunwind is built at the same time as libcxx, but libunwind is not
installed yet. LIBCXXABI_USE_LLVM_UNWINDER makes libcxx link directly
against the just-built libunwind, but the compiler implicit -lunwind
isn't found. This patch avoids that by adding --unwindlib=none if
supported, if we are going to link explicitly against a newly built
unwinder anyway.
Since the previous attempt, this no longer uses
llvm_enable_language_nolink (and thus doesn't set
CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY during the compiler
sanity checks). Setting CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
during compiler sanity checks makes cmake not learn about some
aspects of the compiler, which can make further find_library or
find_package fail. This caused OpenMP to not detect libelf and libffi,
disabling some OpenMP target plugins.
Instead, require the caller to set CMAKE_{C,CXX}_COMPILER_WORKS=YES
when building in a configuration with an incomplete toolchain.
Differential Revision: https://reviews.llvm.org/D113253
Commit: 0b20c96fd65d44ddb3be70b2ac1f51058a105bc5
https://github.com/llvm/llvm-project/commit/0b20c96fd65d44ddb3be70b2ac1f51058a105bc5
Author: Martin Storsjö <martin at martin.st>
Date: 2021-12-09 (Thu, 09 Dec 2021)
Changed paths:
M third-party/benchmark/src/sysinfo.cc
Log Message:
-----------
[benchmark] Reapply fix for -Wcovered-switch-default warning
This reapplies a fix from 948ce4e6edec6ad3cdf1911fc3e8e9569140d4ff,
whichn't originally submitted upstream. I has now been merged upstream
though, in https://github.com/google/benchmark/pull/1302.
When benchmarks were unified in
5dda2efde574d3a200d04c371f561a77ee9f4aff, it lost this change,
but it also lost another local modification, where benchmark's
CMakeLists.txt was modified to comment out adding -Werror.
(This change was part of the original import in
0addd170ab0880941fa4089c2717f3f3a0e4e25a.)
As the benchmark library is built automatically by default, when
building all of LLVM (contrary to the copy in libcxx, which wasn't
built by default), building it with -Werror by default is very brittle.
This fixes building LLVM with MinGW. (It wasn't broken in MSVC
mode, as the benchmark library doesn't add -Werror or anything
equivalent in MSVC mode, and it's unclear if this warning is
enabled in that mode at all.)
Differential Revision: https://reviews.llvm.org/D115434
Compare: https://github.com/llvm/llvm-project/compare/a9a14990809d...0b20c96fd65d
More information about the All-commits
mailing list