Description
LinkerArg doesn't seem to work when publishing NativeAOT targeting net8.0-macos. Maybe I'm missing something, or misinterpreting the reproduction steps but at least that's what it looks like. The actual issue where I'm coming from is that the linker fails when adding a static library that depends on curl, even when -lcurl is added as LinkerArg. The same works just fine when targeting net8.0
Reproduction Steps
Steps to Reproduce
- Create new macOS app:
dotnet new macos
- Add
<PublishAot>true</PublishAot> to .csproj
- Add some linker args that should fail the build, e.g.
<ItemGroup>
<LinkerArg Include="-foobar"/>
<LinkerArg Include="-lnonexistentlib"/>
</ItemGroup>
dotnet publish -flp:logfile=build.log --runtime=osx-arm64
Expected behavior
publishing fails
Actual behavior
publishing succeeds
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Related to:
Description
LinkerArgdoesn't seem to work when publishing NativeAOT targetingnet8.0-macos. Maybe I'm missing something, or misinterpreting the reproduction steps but at least that's what it looks like. The actual issue where I'm coming from is that the linker fails when adding a static library that depends oncurl, even when-lcurlis added asLinkerArg. The same works just fine when targetingnet8.0Reproduction Steps
Steps to Reproduce
dotnet new macos<PublishAot>true</PublishAot>to .csprojdotnet publish -flp:logfile=build.log --runtime=osx-arm64Expected behavior
publishing fails
Actual behavior
publishing succeeds
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Related to: