[libc-commits] [PATCH] D157444: [libc] Make add_libc_unittest compile with -ffreestanding
Guillaume Chatelet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Aug 8 14:47:18 PDT 2023
gchatelet created this revision.
gchatelet added a reviewer: sivachandra.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
gchatelet requested review of this revision.
tests not compile with `-ffreestanding` can pull unwanted dependencies like `limits.h` which defines `PTHREAD_STACK_MIN`.
This is what caused the build bot failure in https://reviews.llvm.org/D156981#4570776.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157444
Files:
libc/cmake/modules/LLVMLibCTestRules.cmake
Index: libc/cmake/modules/LLVMLibCTestRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCTestRules.cmake
+++ libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -152,7 +152,7 @@
)
target_compile_options(
${fq_build_target_name}
- PRIVATE -fpie ${LIBC_COMPILE_OPTIONS_DEFAULT}
+ PRIVATE -fpie -ffreestanding ${LIBC_COMPILE_OPTIONS_DEFAULT}
)
if(LIBC_UNITTEST_COMPILE_OPTIONS)
target_compile_options(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157444.548362.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230808/867a62cc/attachment.bin>
More information about the libc-commits
mailing list