[libc-commits] [PATCH] D149216: [libc] Add path to include generated headers for hermetic tests

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Apr 26 14:52:50 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb5a3bc8f81d: [libc] Add path to include generated headers for hermetic tests (authored by jhuber6).

Changed prior to commit:
  https://reviews.llvm.org/D149216?vs=517122&id=517336#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149216/new/

https://reviews.llvm.org/D149216

Files:
  libc/test/UnitTest/CMakeLists.txt


Index: libc/test/UnitTest/CMakeLists.txt
===================================================================
--- libc/test/UnitTest/CMakeLists.txt
+++ libc/test/UnitTest/CMakeLists.txt
@@ -27,6 +27,10 @@
 
 foreach(lib LibcUnitTest LibcHermeticTest)
   target_include_directories(${lib} PUBLIC ${LIBC_SOURCE_DIR})
+  if(LLVM_LIBC_FULL_BUILD)
+    # If we are in full build mode, then we should use our own public headers.
+    target_include_directories(${lib} PRIVATE ${LIBC_BUILD_DIR}/include)
+  endif()
   target_compile_options(${lib} PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS}
                          -fno-exceptions -fno-rtti)
   add_dependencies(${lib}
@@ -48,6 +52,10 @@
 
 target_include_directories(LibcTestMain PUBLIC ${LIBC_SOURCE_DIR})
 target_compile_options(LibcTestMain PRIVATE -fno-exceptions -fno-rtti)
+if(LLVM_LIBC_FULL_BUILD)
+  target_include_directories(LibcTestMain PRIVATE ${LIBC_BUILD_DIR}/include)
+  target_compile_options(LibcTestMain PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS})
+endif()
 add_dependencies(LibcTestMain LibcUnitTest)
 
 add_header_library(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149216.517336.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230426/41ac3ac7/attachment-0001.bin>


More information about the libc-commits mailing list