If we have --target option, we should detect GCC installation
with this triple first.
So, If we call clang with --target=i386-linux-gnu -m64, we will try
the i386-linux-gnu env with multilib, instead of try x86_64-linux-gnu
first.
Differential D158509
Clang: GCCInstallationDetector follows --target value first wzssyqa on Aug 22 2023, 6:11 AM. Authored by
Details
If we have --target option, we should detect GCC installation So, If we call clang with --target=i386-linux-gnu -m64, we will try
Diff Detail Event TimelineComment Actions -target has been deprecated since 3.4. Please don't make new uses as I have pointed out in other reviews. Comment Actions Thank you for the patch. I think it would actually be nice that we probe the m32 multilib of x86_64-unknown-linux-gnu multilib first for --target=x86_64-unknown-linux-gnu -m32. Unfortunately, due to various setArch code in computeTargetTriple (e.g. D54214), this change may change what lib they use. Comment Actions In fact, it won't affect, since the internal triple is used after the arg of --target is used.
computeTargetTriple should continue be there. Comment Actions For this case (--target is given), maybe we have 2 choice: Group A, which is quite straight forward, while may broken some use case.
Group B:
I prefer Group A. |