-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing of linker flags in the runtime NuGet packs #52603
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
The purpose of I am not familiar enough with .rsp to tell if it is expressive enough to replace |
The problem with The Alternative approach could be leaving pretty much everything as-is on the dotnet/runtime side but produce a .props files in the runtime NuGet that sets MSBuild property/item group with linker flags in a variable recognizable by Xamarin. |
The reason why these are cmake-specific is purely historical. It might not be the only solution and not even the best solution. It just happen to work. I would be open to alternatives. |
That's totally sensible and I am really happy that it was done. I am just pointing out that Xamarin is a third place where these things are hard-coded at the moment (or work by sheer luck) and that it would be nice to find a solution where that hard-coding is removed. I'm not exactly sure what the best solution would be though. Maybe it makes sense to state the requirements first?
|
Follow up to #41299, #52482 (comment), #52482 (comment)
Xamarin consumes the .NET static native libraries (System.Native, System.Security.Cryptography.Native.Apple, Mono runtime, etc.) through NuGet packages. For the iOS/tvOS scenarios Xamarin links the static libraries from the pack into the final executable. In some cases additional linker flags may need to be specified to the final linking command to ensure all the libraries are linked properly.
The current situation on the Xamarin side is that it hard-codes some of the linker flags. Frameworks seem to be imported thanks to references from the managed bindings and finally the rest works through the auto-link magic.
On single-file host scenarios on the dotnet/runtime side
extra_libs.cmake
files are sprinkled around the repository that do the linker flag resolution and plug into the single-file pipeline.I'd like some feedback from the stakeholders whether there is some solution to improve the status quo. For example, if we could produce a linker response file (.rsp) with the necessary linker flags as part of the dotnet/runtime static library builds. The response files could be consumed by the single file host instead of the
extra_libs.cmake
files, shipped in the runtime NuGets and also consumed as part of the MSBuild pipeline on the Xamarin side.cc @VSadov @rolfbjarne @jkoritzinsky @AaronRobinsonMSFT @grendello @akoeplinger
The text was updated successfully, but these errors were encountered: