[libc-commits] [libc] [libc][cmake] Tidy compiler includes (PR #66783)

Sergei Barannikov via libc-commits libc-commits at lists.llvm.org
Wed Sep 20 04:42:19 PDT 2023


================
@@ -189,13 +188,10 @@ function(_build_gpu_objects fq_target_name internal_target_name)
       )
 
       target_compile_options(${gpu_target_name} PRIVATE ${compile_options})
-      target_include_directories(${gpu_target_name} PRIVATE ${include_dirs})
+      target_include_directories(${gpu_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
----------------
s-barannikov wrote:

Ah, right. For some reason I thought that libc is fully isolated from the OS, but it may indeed pull OS headers, and those probably aren't clean (I can imagine warnings about unsupported attributes, pragmas, etc.).
On the other hand, -isystem suppresses warnings coming from libc's headers when building libc itself. This is probably lesser evil.


https://github.com/llvm/llvm-project/pull/66783


More information about the libc-commits mailing list