[libc-commits] [PATCH] D145298: [libc] Simplify integration tests by eliminating the artificial sysroot.

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Sat Mar 4 05:42:45 PST 2023


jhuber6 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})
----------------
Should we use `-nostdinc` as well? Or do we still expect to pick up some system libraries.


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