Repository navigation
Add UsePureLLVMToolchain for compiler-rt+lld combo - #129382
Conversation
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
Is the mixing a matching of static libraries built against GNU rt (what's in the package) with compiler-rt guaranteed to work? |
The static libraries only contain undefined references to the builtins. These are resolved at final link-time by the selected runtime. Since the linker isn't throwing any 'unresolved symbol' errors during my test on Ubuntu/Alpine, the required interface is being satisfied by compiler-rt. Compatibility is quite high which makes compiler-rt usable on distros which default to llvm these days. |
jkotas
left a comment
There was a problem hiding this comment.
LGTM
@MichalStrehovsky Does this look reasonable to you?
MichalStrehovsky
left a comment
There was a problem hiding this comment.
@MichalStrehovsky Does this look reasonable to you?
I kind of wish we could default enable it with LinkerFlavor=lld, but we'd need to extend our list of prerequisites, so it's probably a no-go.
We don't currently document LinkerFlavor on learn.microsoft.com, so this will probably stay in the same category as that or static libssl linking.
At that point it's similarly discoverable as someone finding out they can set LinkerFlavor and pass the LinkerArg (LinkerArg is documented).
I don't expect many people to find out about this new property, but it's in a leafy location where it doesn't hurt to have the property.
|
/ba-g infrastructure timeouts |
```sh # on Alpine, install llvm toolchain without GNU-ness $ apk add clang llvm lld compiler-rt $ dotnet new webapiaot -n wapi1 $ cd $_ $ dotnet publish -p UsePureLLVMToolchain=true ``` Saves `22592` bytes in `webapiaot`.
Saves
22592bytes inwebapiaot.