-
Notifications
You must be signed in to change notification settings - Fork 99
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
libLLVM
isn't working as expected
#157
Comments
This is an issue with NuGet/the runtime as dependencies aren't normally copied to the output folder for non-published builds and so, particularly with the RID specific setup libLLVM has to use, there is no way for the runtime to know where to look for the native dependency. The easiest workaround today is to add the following to the project since that resolves to a RID and allows the correct native bits for "current machine" to be copied by default: <PropertyGroup>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
</PropertyGroup> |
Oh interesting... so if I specify a RID, I'll get the right libLLVM runtime along with my "published" output? That makes sense. I guess I assumed NuGet would bring all of them along for the ride until a RID can be determined (by JIT?). Thanks for you help. |
Just noting that I updated the above property to be conditional, since you want to do that so an explicit RID specified on the command line still works. |
I didn't see this, so I had to build |
It's my understanding (could be wrong) that if I don't expect LLVM to be installed on the machine running my program, I should install the
libLLVM
package so it will output the LLVM library alongside my program.Assuming that's correct so far, when my
csproj
is like so:...and my
Program.cs
is like so:I get this exception, indicating that it can't find the runtime library.
The workaround I used is to specify my specific runtime by referencing package
libLLVM.runtime.win-x64
. While this works, I'd like to be able to build and have it output all the runtimes. Or, build specifically for a runtime with an RID and have it output the necessary libLLVM.The text was updated successfully, but these errors were encountered: