[PATCH] D22469: [compiler-rt] Don't require c++ headers when configuring compiler-rt builds

Jonas Hahnfeld via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 02:14:32 PDT 2016


Hahnfeld added a comment.

In https://reviews.llvm.org/D22469#502308, @beanz wrote:

> @Hahnfeld, agreed with one caveat. We should actually have two versions of the test. In config-ix.cmake we should have the source be a C++ file that does not rely on libcxx headers, and in builtin-config-ix.cmake, we should have the source be C only, because the builtin libraries do not use C++ at all.


Yep, and it looks like this is already implemented: `builtin-config-ix.cmake` sets `TEST_COMPILE_ONLY` and therefore only calls `try_compile_only` which produces its own `SIMPLE_C`.

That said, `config-ix.cmake` is only included from the top directory and not from `lib/builtins` (only `base-config-ix.cmake` and `builtin-config-ix.cmake` are).
So we should just rename back `SIMPLE_SOURCE` to `simple.cc` which makes it compile with a C++ compiler. @fjricci is that acceptable for you?


Repository:
  rL LLVM

https://reviews.llvm.org/D22469





More information about the llvm-commits mailing list