[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 04:27:11 PDT 2023


jhuber6 updated this revision to Diff 517120.
jhuber6 added a comment.

Addressing comments


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
@@ -24,8 +24,12 @@
   HermeticTestUtils.cpp
 )
 
-foreach(lib LibcUnitTest LibcHermeticTest)
+foreach(lib LibcUnitTest LibcHermeticTest LibcTestMain)
   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}


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


More information about the libc-commits mailing list