Skip to content
Discussion options

You must be logged in to vote

For a sample of how to combine C# and C++ projects, see https://github.com/dotnet/samples/tree/main/core/interop/IDynamicInterfaceCastable/src.

so that we could enjoy link time optimization

Link time optimizations assume that instead of native code, the inputs to the linker contain special bytecode known to the Visual C++ compiler (linker will invoke the Visual C++ compiler to generate native code). Native AOT compiler doesn't produce outputs in LTO format because the LTO format is Visual C++ compiler specific. I don't think you'll see benefits of LTO outside sqlite3.lib (which will be the only compiland with LTO bytecode).

SdkNativeLibrary

I suggest using the documented <NativeLibrary>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MichalStrehovsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants