[PATCH] D108416: [llvm-libgcc] initial commit
Louis Dionne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 15 11:10:54 PST 2022
ldionne added inline comments.
================
Comment at: runtimes/CMakeLists.txt:181-200
+# llvm-libgcc incorporates both compiler-rt and libunwind as subprojects with very
+# specific flags, which causes clashes when they're independently built too.
+list(FIND "${runtimes}" "llvm-libgcc" RUNTIMES_HAS_LLVM_LIBGCC)
+if(NOT RUNTIMES_HAS_LLVM_LIBGCC EQUAL -1)
+ list(FIND "${runtimes}" "compiler-rt" RUNTIMES_HAS_COMPILER_RT)
+ list(FIND "${LLVM_ENABLE_PROJECTS}" "compiler-rt" RUNTIMES_PROJECTS_HAS_COMPILER_RT)
+ if(NOT RUNTIMES_HAS_COMPILER_RT EQUAL -1 OR NOT RUNTIMES_PROJECTS_HAS_COMPILER_RT EQUAL -1)
----------------
I think this can be simplified like this:
```
if("llvm-libgcc" IN_LIST runtimes)
if("compiler-rt" IN_LIST runtimes OR "compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS)
message(FATAL_ERROR
"Attempting to build both compiler-rt and llvm-libgcc will cause irreconcilable "
"target clashes. Please choose one or the other, but not both.")
endif()
if("libunwind" IN_LIST runtimes)
message(
FATAL_ERROR
"Attempting to build both libunwind and llvm-libgcc will cause irreconcilable "
"target clashes. Please choose one or the other, but not both.")
endif()
endif()
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108416/new/
https://reviews.llvm.org/D108416
More information about the llvm-commits
mailing list