[PATCH] D48422: [CMake] Add compiler-rt header files to the list of sources for targets when building with an IDE

George Karpenkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 12:30:59 PDT 2018


george.karpenkov added inline comments.


================
Comment at: cmake/Modules/CompilerRTUtils.cmake:356
+  set(headers "")
+  if (XCODE OR MSVC_IDE OR CMAKE_EXTRA_GENERATOR)
+    # For IDEs we need to tell CMake about header files.
----------------
Since we are not testing on MSVC should we really handle it here?


================
Comment at: cmake/Modules/CompilerRTUtils.cmake:361
+    foreach (header_dir ${ARG_ADDITIONAL_HEADER_DIRS})
+      compiler_rt_find_headers_in_dir(headers_in_dir "${header_dir}")
+      list(APPEND headers ${headers_in_dir})
----------------
I'm not sure what do we need here. Could we just ask Clang on each source file which headers it requires? I believe that's what CMake does behind the scenes to support incremental compilation, it's just harder for compiler-rt since we are not using the default compiler.


https://reviews.llvm.org/D48422





More information about the llvm-commits mailing list