Repository navigation
Closed
Labels
area-NativeAOT-coreclruntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Description
This change introduced response files which are written like:
<WriteLinesToFile File="%(_AggregateExecutableReferencePath.ShimCompileLinkRspFile)" Lines="@(_AggregateExecutableShimCompilerAndLinkerArg);"%(_AggregateExecutableReferencePath.ShimSource)";@(_AggregateExecutableShimNativeLibraryArg);-o;"%(_AggregateExecutableReferencePath.ShimBinary)"" Overwrite="true" Encoding="utf-8" WriteOnlyWhenDifferent="true" />
The Encoding="utf-8" causes them to have a BOM, which clang doesn't like.
Reproduction Steps
I get this when building VMR v11.0.0-preview.7.26381.103 from nixpkgs (NixOS/nixpkgs#552339).
The clang error happens when building aspnetcore.
Expected behavior
VMR builds correctly.
Actual behavior
clang : error : no such file or directory: '-fuse-ld=bfd' [/var/tmp/nix-shell.GRrUp4/dotnet-11.0.100-preview.7.26381.103/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
/var/tmp/nix-shell.GRrUp4/dotnet-11.0.100-preview.7.26381.103/src/aspnetcore/artifacts/.packages/microsoft.dotnet.ilcompiler/11.0.0-preview.7.26381.103/build/Microsoft.NETCore.Native.Unix.targets(417,5): error MSB3073: The command ""/nix/store/9r3c3di5srkvkqzhvq66aggpl95630vk-clang-wrapper-20.1.8/bin/clang" @"/var/tmp/nix-shell.GRrUp4/dotnet-11.0.100-preview.7.26381.103/src/aspnetcore/artifacts/obj/aspnetcoretools/Release/net11.0/linux-x64/native/dotnet-dev-certs.aggregateexe.rsp"" exited with code 1. [/var/tmp/nix-shell.GRrUp4/dotnet-11.0.100-preview.7.26381.103/src/aspnetcore/src/Tools/NativeAot/aspnetcoretools/aspnetcoretools.csproj]
Regression?
No response
Known Workarounds
Removing the encoding attribute from the WriteLinesToFile tasks for response files fixes the build.
Configuration
$ clang --version
clang version 20.1.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/7a7i8r23rkz7xshivsgk1rgj6ax7zqbl-clang-20.1.8/bin
Other information
No response
Metadata
Metadata
Assignees
Labels
area-NativeAOT-coreclruntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Type
Projects
- StatusShow more project fieldsNo status
- StatusShow more project fieldsDone
Activity
corngood commentedon Aug 17, 2026
I can't find a recent version of gcc or clang that accepts response files with a BOM that start with
-fuse-ld=bfd. They all seem to fail in the same way (treating it as an input filename).dotnet-policy-service commentedon Aug 17, 2026
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.
NativeAOT: remove BOM from generated source/response files
NativeAOT: remove BOM from generated source/response files (#132408)