We previously used a more stricter -nostdlib option which was also removing
compiler-rt/libgcc.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Does this also need to be applied to this?
foreach(lib LibcHermeticTest LibcHermeticTestMain) target_include_directories(${lib} PRIVATE ${LIBC_BUILD_DIR}/include) target_compile_options(${lib} PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS} -ffreestanding -nostdlib -nostdlib++) endforeach()
Comment Actions
I'm assuming this solution won't work on the GPU anyway since we don't have a compiler-rt there anyway. But for the CPU it should be fine as long as the final link has it.
Comment Actions
-nostdlib++ is a clang-only flag, gcc fails with:
g++-12: error: unrecognized command-line option ‘-nostdlib++’; did you mean ‘-nostdlib’?