@@ -75,8 +75,17 @@ public static void CompileAssemblies(ExportPlugin exporter, AotOptions aotOpts,
75
75
}
76
76
else
77
77
{
78
- string bits = features . Contains ( "64" ) ? "64" : features . Contains ( "32" ) ? "32" : null ;
79
- CompileAssembliesForDesktop ( exporter , platform , isDebug , bits , aotOpts , aotTempDir , outputDataDir , assembliesPrepared , bclDir ) ;
78
+ string arch = "" ;
79
+ if ( features . Contains ( "x86_64" ) ) {
80
+ arch = "x86_64" ;
81
+ } else if ( features . Contains ( "x86_32" ) ) {
82
+ arch = "x86_32" ;
83
+ } else if ( features . Contains ( "arm64" ) ) {
84
+ arch = "arm64" ;
85
+ } else if ( features . Contains ( "arm32" ) ) {
86
+ arch = "arm32" ;
87
+ }
88
+ CompileAssembliesForDesktop ( exporter , platform , isDebug , arch , aotOpts , aotTempDir , outputDataDir , assembliesPrepared , bclDir ) ;
80
89
}
81
90
}
82
91
@@ -112,7 +121,7 @@ public static void CompileAssembliesForAndroid(ExportPlugin exporter, bool isDeb
112
121
}
113
122
}
114
123
115
- public static void CompileAssembliesForDesktop ( ExportPlugin exporter , string platform , bool isDebug , string bits , AotOptions aotOpts , string aotTempDir , string outputDataDir , IDictionary < string , string > assemblies , string bclDir )
124
+ public static void CompileAssembliesForDesktop ( ExportPlugin exporter , string platform , bool isDebug , string arch , AotOptions aotOpts , string aotTempDir , string outputDataDir , IDictionary < string , string > assemblies , string bclDir )
116
125
{
117
126
foreach ( var assembly in assemblies )
118
127
{
@@ -126,9 +135,9 @@ public static void CompileAssembliesForDesktop(ExportPlugin exporter, string pla
126
135
string outputFileName = assemblyName + ".dll" + outputFileExtension ;
127
136
string tempOutputFilePath = Path . Combine ( aotTempDir , outputFileName ) ;
128
137
129
- var compilerArgs = GetAotCompilerArgs ( platform , isDebug , bits , aotOpts , assemblyPath , tempOutputFilePath ) ;
138
+ var compilerArgs = GetAotCompilerArgs ( platform , isDebug , arch , aotOpts , assemblyPath , tempOutputFilePath ) ;
130
139
131
- string compilerDirPath = GetMonoCrossDesktopDirName ( platform , bits ) ;
140
+ string compilerDirPath = GetMonoCrossDesktopDirName ( platform , arch ) ;
132
141
133
142
ExecuteCompiler ( FindCrossCompiler ( compilerDirPath ) , compilerArgs , bclDir ) ;
134
143
@@ -432,9 +441,9 @@ private static IEnumerable<string> GetAotCompilerArgs(string platform, bool isDe
432
441
433
442
var androidToolPrefixes = new Dictionary < string , string >
434
443
{
435
- [ "armeabi-v7a " ] = "arm-linux-androideabi-" ,
436
- [ "arm64-v8a " ] = "aarch64-linux-android-" ,
437
- [ "x86 " ] = "i686-linux-android-" ,
444
+ [ "arm32 " ] = "arm-linux-androideabi-" ,
445
+ [ "arm64" ] = "aarch64-linux-android-" ,
446
+ [ "x86_32 " ] = "i686-linux-android-" ,
438
447
[ "x86_64" ] = "x86_64-linux-android-"
439
448
} ;
440
449
@@ -547,9 +556,9 @@ private static IEnumerable<string> GetEnabledAndroidAbis(string[] features)
547
556
{
548
557
var androidAbis = new [ ]
549
558
{
550
- "armeabi-v7a " ,
551
- "arm64-v8a " ,
552
- "x86 " ,
559
+ "arm32 " ,
560
+ "arm64" ,
561
+ "x86_32 " ,
553
562
"x86_64"
554
563
} ;
555
564
@@ -560,9 +569,9 @@ private static string GetAndroidTriple(string abi)
560
569
{
561
570
var abiArchs = new Dictionary< string , string >
562
571
{
563
- [ "armeabi-v7a " ] = "armv7" ,
564
- [ "arm64-v8a " ] = "aarch64-v8a" ,
565
- [ "x86 " ] = "i686" ,
572
+ [ "arm32 " ] = "armv7" ,
573
+ [ "arm64" ] = "aarch64-v8a" ,
574
+ [ "x86_32 " ] = "i686" ,
566
575
[ "x86_64" ] = "x86_64"
567
576
} ;
568
577
@@ -571,30 +580,25 @@ private static string GetAndroidTriple(string abi)
571
580
return $"{ arch} - linux - android";
572
581
}
573
582
574
- private static string GetMonoCrossDesktopDirName ( string platform , string bits )
583
+ private static string GetMonoCrossDesktopDirName ( string platform , string arch )
575
584
{
576
585
switch ( platform )
577
586
{
578
587
case OS. Platforms. Windows:
579
588
case OS.Platforms.UWP:
580
589
{
581
- string arch = bits == "64 " ? "x86_64" : "i686" ;
582
590
return $"windows- { arch} ";
583
591
}
584
592
case OS. Platforms . MacOS :
585
593
{
586
- Debug.Assert(bits == null || bits == "64 ") ;
587
- string arch = "x86_64";
588
594
return $"{ platform} - { arch} ";
589
595
}
590
596
case OS. Platforms . LinuxBSD :
591
597
{
592
- string arch = bits == "64 " ? "x86_64" : "i686" ;
593
598
return $"linux- { arch} ";
594
599
}
595
600
case OS. Platforms . Haiku :
596
601
{
597
- string arch = bits == "64 " ? "x86_64" : "i686" ;
598
602
return $"{ platform} - { arch} ";
599
603
}
600
604
default :
0 commit comments