[PATCH] D47834: [CMake] Passthrough additional flags to custom libcxx CMake build
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 6 13:07:51 PDT 2018
phosek marked an inline comment as done.
phosek added inline comments.
================
Comment at: compiler-rt/cmake/Modules/AddCompilerRT.cmake:522
+ endforeach()
+ endforeach()
+
----------------
morehouse wrote:
> What is this code block doing?
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.
================
Comment at: compiler-rt/cmake/Modules/AddCompilerRT.cmake:513
+
+ string(REPLACE ";" " " FLAGS_STRING "${LIBCXX_CFLAGS}")
+ set(LIBCXX_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS_STRING}")
----------------
morehouse wrote:
> Why is this replacement necessary?
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.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D47834
More information about the llvm-commits
mailing list