Update NativeAOT build settings and use ToLowerInvariant

This commit is contained in:
Alex Barney 2023-12-16 22:46:37 -07:00
parent 7a8f0de6db
commit 908c2ca8ff
3 changed files with 15 additions and 8 deletions

View file

@ -126,11 +126,11 @@ internal static class CliParser
if (args[i].Length == 2 && (args[i][0] == '-' || args[i][0] == '/'))
{
arg = args[i][1].ToString().ToLower();
arg = args[i][1].ToString().ToLowerInvariant();
}
else if (args[i].Length > 2 && (args[i][0] == '-' && args[i][1] == '-'))
{
arg = args[i].Substring(2).ToLower();
arg = args[i].Substring(2).ToLowerInvariant();
}
else
{
@ -176,7 +176,7 @@ internal static class CliParser
private static FileType ParseFileType(Options options, string input)
{
switch (input.ToLower())
switch (input.ToLowerInvariant())
{
case "nca": return FileType.Nca;
case "pfs0": return FileType.Pfs0;

View file

@ -388,7 +388,7 @@ internal static class ProcessBench
{
CpuFrequency = ctx.Options.CpuFrequencyGhz * 1_000_000_000;
switch (ctx.Options.BenchType?.ToLower())
switch (ctx.Options.BenchType?.ToLowerInvariant())
{
case "aesctr":
{

View file

@ -30,15 +30,22 @@
<PropertyGroup Condition=" $(BuildType.StartsWith('native')) and '$(BuildType)' != 'native-untrimmed' ">
<IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
<IlcOptimizationPreference>Speed</IlcOptimizationPreference>
<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
</PropertyGroup>
<!-- No-reflection mode might not work on Linux if the HOME environment variable is not set -->
<PropertyGroup Condition=" '$(BuildType)' == 'native-noreflection' ">
<PropertyGroup Condition=" '$(BuildType)' == 'native-noreflection' or '$(BuildType)' == 'native-minimal' ">
<IlcDisableReflection>true</IlcDisableReflection>
<DefineConstants>NATIVEAOT_NO_REFLECTION;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(BuildType)' == 'native-minimal' ">
<OptimizationPreference>Size</OptimizationPreference>
<InvariantGlobalization>true</InvariantGlobalization>
<StackTraceSupport>false</StackTraceSupport>
</PropertyGroup>
<ItemGroup Condition=" '$(BuildType)' == 'native-untrimmed' ">
<TrimmerRootAssembly Include="LibHac" />
</ItemGroup>
</Project>