mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 04:39:31 -10:00
When user passes versioned native compiler argument such as `-clang10.1` or `-gcc9.2` to the top-level `:/build.sh`, `:/eng/build.sh` transforms that to msbuild property called `<Compiler>` with raw/unprocessed value. In coreclr, libs, corehost and tests partitions, we end up calling `:/eng/native/build-commons.sh`, which slices the compiler name, major and minor versions, then calls `:/eng/native/gen-buildsys.sh` with individual components. That is just a pass-thru script for the final `:/eng/common/native/init-compiler.sh`, where those arguments are actually used. In `mono.proj` and `NativeExports.csproj`, we do not use `build-commons` script, but instead, invoke `init-compiler.sh` directly with the raw `<Compiler>` property. That causes an error when versioned native compiler is specified on the command line. This PR fixes this issue by pushing version parsing code into `init-compiler.sh` so all its consumers get the same behavior.