This fixes scenarios like the runtime build wherein the clang is
built to use libcxx or libunwind by default which are either not yet
built or not yet installed in the places where the clang driver expects
them.
Fixes llvm/llvm-project#59762
Differential D141997
[libc][NFC] Detect host CPU features using try_compile instead of try_run. sivachandra on Jan 18 2023, 1:00 AM. Authored by
Details
This fixes scenarios like the runtime build wherein the clang is Fixes llvm/llvm-project#59762
Diff Detail
Event TimelineComment Actions Thx for the patch @sivachandra! It's definitely better than what I did, I was unhappy with the design but it was a first step. There are still a few issues in my opinion:
I think this can be improved further. Here is what I have in mind :
WDYT? I can take a look at it if you want? Comment Actions I think the essential idea you are proposing is to move feature detection from config time to build time. Is that correct? If yes, that sounds OK to me as long as we can do the detection without having to run fully linked executables (which is the core problem this patch is trying to solve.) Comment Actions I've created https://reviews.llvm.org/D142108 as a replacement for this patch. Let me know what you think. Comment Actions https://reviews.llvm.org/D142108 has been submitted, this patch can be marked as abandoned. |