[libc-commits] [PATCH] D149683: [libc] Replace -nostdlib with -nolibc and -nostartfiles for hermetic test link.
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue May 2 12:58:58 PDT 2023
jhuber6 added a comment.
In D149683#4313428 <https://reviews.llvm.org/D149683#4313428>, @sivachandra wrote:
> In D149683#4313423 <https://reviews.llvm.org/D149683#4313423>, @jhuber6 wrote:
>
>> 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()
>
> Creating static/object libraries does not involve the linker so may be not required?
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149683/new/
https://reviews.llvm.org/D149683
More information about the libc-commits
mailing list