-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
From @am11 in #84794 (comment):
- we can no longer build runtime repo with binutils alone.
i.e.
LinkerFlavor=lld if target==linuxconstructs added are missingand Compiler!=gcccondition; we setCompilerat the start of build:(maps toLine 432 in ed0f1c5
arguments="$arguments /p:Compiler=$compiler /p:CppCompilerAndLinker=$compiler" ./build.sh -gcc)
The ability to compile with gcc+binutils is tested by the gcc product build leg, but this doesn't cover test builds. Conditions similar to
| <UseLLVMLinker Condition="'$(CppCompilerAndLinker)' == 'clang' and '$(TargetOS)' == 'linux'">true</UseLLVMLinker> |
That still leaves the scenario of building with clang+bfd (where clang and binutils are installed, but lld isn't). From #84794 (comment):
changes in #84148 will "force" fuse-ld=lld unconditionally, disregarding #2's introspection based linker selection, and fail the build because we didn't install lld-16
When using clang as the linker driver, the NativeAot targets either explicitly use bfd (the default), or can be made to use lld via LinkerFlavor. So the fix for this would be to perform detection of lld when using the clang compiler, and set LinkerFlavor based on the result.