[libc-commits] [PATCH] D145298: [libc] Simplify integration tests by eliminating the artificial sysroot.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sat Mar 4 10:19:40 PST 2023
sivachandra added inline comments.
================
Comment at: libc/cmake/modules/LLVMLibCTestRules.cmake:493
target_compile_options(${fq_build_target_name} PRIVATE -ffreestanding ${INTEGRATION_TEST_COMPILE_OPTIONS})
- # We set a number of link options to prevent picking up system libc binaries.
- # Also, we restrict the integration tests to fully static executables. The
- # rtlib is set to compiler-rt to make the compiler drivers pick up the compiler
- # runtime binaries using full paths. Otherwise, files like crtbegin.o are passed
- # as is (and not as paths like /usr/lib/.../crtbegin.o).
- target_link_options(${fq_build_target_name} PRIVATE --sysroot=${sysroot} -static -stdlib=libc++ --rtlib=compiler-rt)
+ target_link_options(${fq_build_target_name} PRIVATE -nostdlib -static)
+ target_link_libraries(${fq_build_target_name} ${INTEGRATION_TEST_STARTUP} ${link_object_files})
----------------
jhuber6 wrote:
> Should we use `-nostdinc` as well? Or do we still expect to pick up some system libraries.
Our libc does not [yet] provide the free standing headers like `stddef.h` and `stdint.h`. Using `-nostdinc` eliminates the paths to the compiler's freestanding headers also. So, we cannot [yet] use `-nostdinc`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145298/new/
https://reviews.llvm.org/D145298
More information about the libc-commits
mailing list