[PATCH] D19692: [CMake] NFC. Add support for testing the compiler without testing the linker

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 11:12:29 PDT 2016


beanz added inline comments.

================
Comment at: cmake/Modules/BuiltinTests.cmake:9
@@ +8,3 @@
+  execute_process(
+    COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${ARGN} -c ${SIMPLE_C}
+    RESULT_VARIABLE result
----------------
compnerd wrote:
> Is there an assumption that we will only use a GNU style driver?  What is insufficient about `CMAKE_C_COMPILE_OBJECT`?
Generally I think that we *should* be able to assume a Unix-conformant driver because if you're building the builtin library and you're not using Clang to do it you're probably doing something wrong.

That statement isn't true for the wider compiler-rt project, but I don't think we should be supporting the builtin libraries on any other toolchains.

That said, writing some CMake goop to construct a compiler command based on CMAKE_C_COMPILE_OBJECT shouldn't be too bad, so I'll do it.


http://reviews.llvm.org/D19692





More information about the llvm-commits mailing list