mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
Refactor build properties for Linux and OSX builds
Previously, we used the catch all OS=Unix property in MSBuild to determine if we were building for Windows vs Unix, and we shared the same MSIL between Linux and OSX. However, we have already started to take dependencies on Linux specific APIs and we plan on using OSX specific APIs very soon. We don't want to try to ship MSIL that contains both Linux and OSX specific implementations of a feature, so the build system needs to change a little. We'll continue to use the OS property as the entry point for the build to specificy what platform you want to build for. However, we now have three platforms: 1. Windows_NT 2. Linux 3. OSX However, the value of the OS property should not be tested directly, instead we introduce properties about the target platform itself: 1. TargetsWindows 2. TargetsUnix 3. TargetsLinux 4. TargetsOSX Code which works the same across Linux and OSX should be guarded by TargetsUnix (which is true when OS is either 'Linux' or 'OSX'). Code specific to one OS can be guarded with either TargetsLinux or TargetsUnix. In this change, I have simply rewritten all the '$(OS)' == 'Unix' conditions to '$(TargetsUnix)' == 'true'. A few libraries may do Linux specific stuff, but we will clean up that debt when we go to flesh out the OSX implementations. Commit migrated from https://github.com/dotnet/corefx/commit/4d07173fbf86631d49ed56623581eff9cb7d3f87
This commit is contained in:
1 parent
5a37ba7e4b
commit
53a9f1fe9a
25 files changed
+420
-236
No files matched your search
@@ -9,26 +9,38 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Text.Encoding.CodePa
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Unix_Debug|Any CPU = Unix_Debug|Any CPU
|
||||
Unix_Release|Any CPU = Unix_Release|Any CPU
|
||||
Linux_Debug|Any CPU = Linux_Debug|Any CPU
|
||||
Linux_Release|Any CPU = Linux_Release|Any CPU
|
||||
OSX_Debug|Any CPU = OSX_Debug|Any CPU
|
||||
OSX_Release|Any CPU = OSX_Release|Any CPU
|
||||
Windows_Debug|Any CPU = Windows_Debug|Any CPU
|
||||
Windows_Release|Any CPU = Windows_Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Unix_Debug|Any CPU.ActiveCfg = Unix_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Unix_Debug|Any CPU.Build.0 = Unix_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Unix_Release|Any CPU.ActiveCfg = Unix_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Unix_Release|Any CPU.Build.0 = Unix_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Linux_Debug|Any CPU.ActiveCfg = Linux_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Linux_Debug|Any CPU.Build.0 = Linux_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Linux_Release|Any CPU.ActiveCfg = Linux_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Linux_Release|Any CPU.Build.0 = Linux_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.OSX_Debug|Any CPU.ActiveCfg = OSX_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.OSX_Debug|Any CPU.Build.0 = OSX_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.OSX_Release|Any CPU.ActiveCfg = OSX_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.OSX_Release|Any CPU.Build.0 = OSX_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Windows_Debug|Any CPU.ActiveCfg = Windows_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Windows_Debug|Any CPU.Build.0 = Windows_Debug|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Windows_Release|Any CPU.ActiveCfg = Windows_Release|Any CPU
|
||||
{16EE6633-F557-5C9E-9EF3-B5334B044F47}.Windows_Release|Any CPU.Build.0 = Windows_Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Unix_Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Unix_Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Linux_Debug|Any CPU.ActiveCfg = Linux_Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Linux_Debug|Any CPU.Build.0 = Linux_Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Linux_Release|Any CPU.ActiveCfg = Linux_Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Linux_Release|Any CPU.Build.0 = Linux_Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.OSX_Debug|Any CPU.ActiveCfg = OSX_Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.OSX_Debug|Any CPU.Build.0 = OSX_Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.OSX_Release|Any CPU.ActiveCfg = OSX_Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.OSX_Release|Any CPU.Build.0 = OSX_Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Debug|Any CPU.ActiveCfg = Windows_Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Debug|Any CPU.Build.0 = Windows_Debug|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Release|Any CPU.ActiveCfg = Windows_Release|Any CPU
|
||||
{9574CEEC-5554-411B-B44C-6CA9EC1CEB08}.Windows_Release|Any CPU.Build.0 = Windows_Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in new issue
Block a user