mono / CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
MIT License
3.15k stars 518 forks source link

Resolve "Error finding an LLVM build" (#1831) #1832

Open cmcneish opened 9 months ago

cmcneish commented 9 months ago

Pass through Visual Studio version from build.sh into build/LLVM.lua, so that the downloaded version is consistent with build.sh's view rather than the host command prompt's view.

This should fix #1831.

Questions (1st time I've written any premake...):

cmcneish commented 9 months ago

@dotnet-policy-service agree

tritao commented 9 months ago

The only problem I see with this is that now we will always set the vs option in Premake, so it will not act as an override.

I think you can rename the existing vs variable to action_vs and add a new vs that is empty by default. Then --vs=$vs will end up as --vs= and OPTIONS["vs"] will not be set anymore.

cmcneish commented 9 months ago

Sorry about the delay, I don't have too much time to work on this. (If you want to finish this up I don't mind)

I think you can rename the existing vs variable to action_vs and add a new vs that is empty by default. Then --vs=$vs will end up as --vs= and OPTIONS["vs"] will not be set anymore.

Is the idea here to provide a different override for LLVM's VS version than the one used to build CppSharp? Would this warrant a new top-level argument in build.sh (say, --llvm_vs)?