-
-
Notifications
You must be signed in to change notification settings - Fork 952
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Added new CPU-specific variants to runtime.json (#370)
- Loading branch information
Showing
3 changed files
with
316 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<#@ template debug="false" hostspecific="false" language="C#" #> | ||
<#@ assembly name="System.Core" #> | ||
<#@ import namespace="System.Linq" #> | ||
<#@ import namespace="System.Text" #> | ||
<#@ import namespace="System.Collections.Generic" #> | ||
<#@ output extension=".json" #> | ||
{ | ||
"runtimes": { | ||
<# // Redefine defaults #> | ||
"win": { | ||
"#import": [ | ||
"win-d3d11", | ||
"any" | ||
] | ||
}, | ||
"linux": { | ||
"#import": [ | ||
"linux-opengl", | ||
"unix" | ||
] | ||
}, | ||
<# foreach (var platform in new[] { "win", "win7", "win10", "linux" }) | ||
{ | ||
foreach (var graphicsPlatform in platform.StartsWith("win") ? new[] { "d3d11", "d3d12", "opengl", "opengles", "vulkan" } : new[] { "opengl", "vulkan" }) | ||
{ | ||
var platformForGraphicsPlatformVariant = platform.StartsWith("win") ? "win" : platform; | ||
foreach (var cpuVariant in platform.StartsWith("win") ? new[] { string.Empty, "-x86", "-x64" } : new[] { string.Empty, "-x64" }) | ||
{ #> | ||
"<#=platform#>-<#= graphicsPlatform #><#= cpuVariant #>": { | ||
"#import": [ | ||
<# if (cpuVariant != string.Empty) { #> | ||
"<#= platform #>-<#= graphicsPlatform #>", | ||
<# } else if (platformForGraphicsPlatformVariant != platform) { #> | ||
"<#= platformForGraphicsPlatformVariant #>-<#= graphicsPlatform #>", | ||
<# } #> | ||
"<#= platform #><#= cpuVariant #>" | ||
] | ||
}, | ||
<# } | ||
} | ||
} #> | ||
"osx": { | ||
"#import": [ | ||
"osx-vulkan", | ||
"unix" | ||
] | ||
} | ||
} | ||
} |