ARM64_32 Debug Mode (#7012)
* [builds] add arm64_32 cross compiler * [mtouch] force --interpreter on arm64_32 debug mode build * [mtouch] include debug check for arm64_32 and reflect error codes in documentation
This commit is contained in:
Родитель
80e6e63f87
Коммит
26ec2826aa
|
@ -958,6 +958,7 @@ install-local:: install-cross
|
|||
$(MONO_IOS_SDK_DESTDIR)/ios-cross32-release/bin/arm-darwin-mono-sgen: .stamp-$(MONO_BUILD_MODE)
|
||||
$(MONO_IOS_SDK_DESTDIR)/ios-cross64-release/bin/aarch64-darwin-mono-sgen: .stamp-$(MONO_BUILD_MODE)
|
||||
$(MONO_IOS_SDK_DESTDIR)/ios-crosswatch-release/bin/armv7k-unknown-darwin-mono-sgen: .stamp-$(MONO_BUILD_MODE)
|
||||
$(MONO_IOS_SDK_DESTDIR)/ios-crosswatch-release/bin/aarch64-apple-darwin10_ilp32-mono-sgen: .stamp-$(MONO_BUILD_MODE)
|
||||
|
||||
$(PREFIX)/bin/arm-darwin-mono-sgen: $(MONO_IOS_SDK_DESTDIR)/ios-cross32-release/bin/arm-darwin-mono-sgen | $(PREFIX)/bin
|
||||
$(call Q_2,INSTALL ,[CROSS]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@
|
||||
|
@ -968,11 +969,14 @@ $(PREFIX)/bin/arm64-darwin-mono-sgen: $(MONO_IOS_SDK_DESTDIR)/ios-cross64-releas
|
|||
$(PREFIX)/bin/armv7k-unknown-darwin-mono-sgen: $(MONO_IOS_SDK_DESTDIR)/ios-crosswatch-release/bin/armv7k-unknown-darwin-mono-sgen | $(PREFIX)/bin
|
||||
$(call Q_2,INSTALL ,[CROSS]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@
|
||||
|
||||
$(PREFIX)/bin/arm64_32-darwin-mono-sgen: $(MONO_IOS_SDK_DESTDIR)/ios-crosswatch64_32-release/bin/aarch64-apple-darwin10_ilp32-mono-sgen | $(PREFIX)/bin
|
||||
$(call Q_2,INSTALL ,[CROSS]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@
|
||||
|
||||
$(PREFIX)/bin:
|
||||
$(Q) mkdir -p $@
|
||||
|
||||
.PHONY: install-cross
|
||||
install-cross: $(PREFIX)/bin/arm-darwin-mono-sgen $(PREFIX)/bin/arm64-darwin-mono-sgen $(PREFIX)/bin/armv7k-unknown-darwin-mono-sgen
|
||||
install-cross: $(PREFIX)/bin/arm-darwin-mono-sgen $(PREFIX)/bin/arm64-darwin-mono-sgen $(PREFIX)/bin/armv7k-unknown-darwin-mono-sgen $(PREFIX)/bin/arm64_32-darwin-mono-sgen
|
||||
|
||||
#
|
||||
# LLVM
|
||||
|
|
|
@ -966,6 +966,18 @@ This warning is shown if the assemblies names given to the `--interpreter` optio
|
|||
|
||||
<!-- 0143-0144: used by mmp -->
|
||||
|
||||
<a name="MT0145" />
|
||||
|
||||
### MT0145: Please use device builds on WatchOS.
|
||||
|
||||
This error occurs if you use combined device builds for a Watch extension project. Per device builds are default in new projects.
|
||||
|
||||
<a name="MT0146" />
|
||||
|
||||
### MT0146: ARM64_32 Debug mode requires --interpreter[=all], forcing it.
|
||||
|
||||
This warning is shown when `--interpreter` isn't specified explicitly for ARM64_32 Debug builds. The AOT compiler can't be used because it doesn't support ARM64_32.
|
||||
|
||||
# MT1xxx: Project related error messages
|
||||
|
||||
### MT10xx: Installer / mtouch
|
||||
|
|
|
@ -281,7 +281,7 @@ namespace Xamarin.Bundler {
|
|||
aotInfo.AsmFiles.Add (asm_output);
|
||||
aotInfo.AotDataFiles.Add (data);
|
||||
|
||||
var aotCompiler = Driver.GetAotCompiler (App, Target.Is64Build);
|
||||
var aotCompiler = Driver.GetAotCompiler (App, abi, Target.Is64Build);
|
||||
var aotArgs = Driver.GetAotArguments (App, assembly_path, abi, build_dir, asm_output ?? other_output, llvm_aot_ofile, data);
|
||||
var task = new AOTTask
|
||||
{
|
||||
|
|
|
@ -218,7 +218,8 @@ namespace Xamarin.Bundler
|
|||
if (Assembly.HasDependencyMap)
|
||||
inputs.AddRange (Assembly.DependencyMap);
|
||||
inputs.Add (AssemblyName);
|
||||
inputs.Add (Driver.GetAotCompiler (Assembly.App, Assembly.Target.Is64Build));
|
||||
foreach (var abi in Assembly.Target.Abis)
|
||||
inputs.Add (Driver.GetAotCompiler (Assembly.App, abi, Assembly.Target.Is64Build));
|
||||
var mdb = Assembly.FullPath + ".mdb";
|
||||
if (File.Exists (mdb))
|
||||
inputs.Add (mdb);
|
||||
|
|
|
@ -362,7 +362,7 @@ namespace Xamarin.Bundler
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static string GetAotCompiler (Application app, bool is64bits)
|
||||
public static string GetAotCompiler (Application app, Abi abi, bool is64bits)
|
||||
{
|
||||
switch (app.Platform) {
|
||||
case ApplePlatform.iOS:
|
||||
|
@ -372,7 +372,12 @@ namespace Xamarin.Bundler
|
|||
return Path.Combine (cross_prefix, "bin", "arm-darwin-mono-sgen");
|
||||
}
|
||||
case ApplePlatform.WatchOS:
|
||||
return Path.Combine (cross_prefix, "bin", "armv7k-unknown-darwin-mono-sgen");
|
||||
/* Use arm64_32 cross only for Debug mode */
|
||||
if (abi == Abi.ARM64_32 && !app.EnableLLVMOnlyBitCode) {
|
||||
return Path.Combine (cross_prefix, "bin", "arm64_32-darwin-mono-sgen");
|
||||
} else {
|
||||
return Path.Combine (cross_prefix, "bin", "armv7k-unknown-darwin-mono-sgen");
|
||||
}
|
||||
case ApplePlatform.TVOS:
|
||||
return Path.Combine (cross_prefix, "bin", "arm64-darwin-mono-sgen");
|
||||
default:
|
||||
|
@ -1339,14 +1344,24 @@ namespace Xamarin.Bundler
|
|||
app.UseInterpreter = false;
|
||||
}
|
||||
|
||||
// FIXME: the interpreter only supports ARM64 right now
|
||||
// FIXME: the interpreter only supports ARM64{,_32} right now
|
||||
// temporary - without a check here the error happens when deploying
|
||||
if (!app.IsSimulatorBuild && !app.IsArchEnabled (Abi.ARM64))
|
||||
if (!app.IsSimulatorBuild && (!app.IsArchEnabled (Abi.ARM64) && !app.IsArchEnabled (Abi.ARM64_32)))
|
||||
throw ErrorHelper.CreateError (99, "Internal error: The interpreter is currently only available for 64 bits.");
|
||||
|
||||
// needs to be set after the argument validations
|
||||
// interpreter can use some extra code (e.g. SRE) that is not shipped in the default (AOT) profile
|
||||
app.EnableRepl = true;
|
||||
} else {
|
||||
if (app.Platform == ApplePlatform.WatchOS && app.IsArchEnabled (Abi.ARM64_32) && app.BitCodeMode != BitCodeMode.LLVMOnly) {
|
||||
if (app.IsArchEnabled (Abi.ARMv7k)) {
|
||||
throw ErrorHelper.CreateError (145, "Please use device builds on WatchOS.");
|
||||
} else {
|
||||
ErrorHelper.Warning (146, "ARM64_32 Debug mode requires --interpreter[=all], forcing it.");
|
||||
app.UseInterpreter = true;
|
||||
app.InterpretedAssemblies.Clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cross_prefix == null)
|
||||
|
|
Загрузка…
Ссылка в новой задаче