diff options
| author | Joseph Huber <huberjn@outlook.com> | 2025-11-03 08:21:32 -0600 |
|---|---|---|
| committer | Joseph Huber <huberjn@outlook.com> | 2025-11-03 08:24:41 -0600 |
| commit | 9c26170dd70865d253727e5122ce2a892d55800e (patch) | |
| tree | c66fe01aacab4d95870f868dbf259371e4ee25bf /runtimes | |
| parent | bf2f5773d9d50d74a4cdeac4d88762e2d9776175 (diff) | |
[libc] Fix Linux kernel headers being included on all OS's
Summary:
The changes in
https://github.com/llvm/llvm-project/commit/43bd7e3bb903af5076a9552f4f64cfc5d58f76ce
altered how we handled including headers, this included the system on
the GPU target which poisoned the include path that was curated to not
include any system headers. Change this to only apply is the target OS
is Linux.
Diffstat (limited to 'runtimes')
| -rw-r--r-- | runtimes/cmake/Modules/HandleLibC.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtimes/cmake/Modules/HandleLibC.cmake b/runtimes/cmake/Modules/HandleLibC.cmake index 01da5b260d3d..f8869512f99d 100644 --- a/runtimes/cmake/Modules/HandleLibC.cmake +++ b/runtimes/cmake/Modules/HandleLibC.cmake @@ -30,7 +30,9 @@ elseif (RUNTIMES_USE_LIBC STREQUAL "llvm-libc") check_cxx_compiler_flag(-nostdlibinc CXX_SUPPORTS_NOSTDLIBINC_FLAG) if(CXX_SUPPORTS_NOSTDLIBINC_FLAG) target_compile_options(runtimes-libc-headers INTERFACE "-nostdlibinc") - target_compile_options(runtimes-libc-headers INTERFACE "-idirafter${LIBC_KERNEL_HEADERS}") + if(LIBC_KERNEL_HEADERS) + target_compile_options(runtimes-libc-headers INTERFACE "-idirafter${LIBC_KERNEL_HEADERS}") + endif() endif() add_library(runtimes-libc-static INTERFACE) |
