This is needed when we're cross-compiling compiler-rt.
Details
- Reviewers
morehouse vitalybuka EricWF - Commits
- rG22f8825dca8d: Reland "Passthrough additional flags to custom libcxx CMake build"
rG3cf6db2d5613: [CMake] Passthrough additional flags to custom libcxx CMake build
rCRT334570: Reland "Passthrough additional flags to custom libcxx CMake build"
rL334570: Reland "Passthrough additional flags to custom libcxx CMake build"
rCRT334139: [CMake] Passthrough additional flags to custom libcxx CMake build
rL334139: [CMake] Passthrough additional flags to custom libcxx CMake build
Diff Detail
- Repository
- rL LLVM
Event Timeline
compiler-rt/cmake/Modules/AddCompilerRT.cmake | ||
---|---|---|
522 ↗ | (On Diff #150159) | What is this code block doing? |
compiler-rt/cmake/Modules/AddCompilerRT.cmake | ||
---|---|---|
513 ↗ | (On Diff #150176) | Why is this replacement necessary? |
compiler-rt/cmake/Modules/AddCompilerRT.cmake | ||
---|---|---|
513 ↗ | (On Diff #150176) | This is an equivalent of the foreach originally on line 477 but done as a one-liner. The reason is that flags passed via an argument will be a ; separated CMake list, so we need to convert it to a string where individual flags are separated by spaces. |
522 ↗ | (On Diff #150159) | I was planning on using variables like CLANG_DEFAULT_RTLIB to infer whether to use compiler-rt builtins by default in libc++ like we do in compiler-rt now hence passing these variables through, but that functionality isn't implemented yet so it's probably easier to just punt on it for now and do it later in a separate patch. |
compiler-rt/cmake/Modules/AddCompilerRT.cmake | ||
---|---|---|
516 ↗ | (On Diff #150176) | Does it make sense to move this whole section closer to the ExternalProject_Add below? |
Reverted in https://reviews.llvm.org/rCRT334528 due to bot breakage: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/12522.
Thanks for the heads up and sorry about the breakage, I'll see if I can reproduce this locally and come up with a fix.
Turned out that passing all CFLAGS, CXXFLAGS and LDFLAGS throught to libc++ isn't really going to work because some of those such as -Werror -Wall might break some CMake checks. Instead we should pass flags to libc++ more selectively.