[mtouch] Build into arch-specific temporary directories, instead of having arch-specific filenames.
This makes dylibs automatically have the correct dylib id, which means no fixups are required. For instance: we'd build libpinvokes.armv7.dylib from libpinvokes.armv7.m, which by default ends up with a dylib id of "libpinvokes.armv7.dylib". With this fix no change is required, since we now build armv7/libpinvokes.dylib from armv7/libpinvokes.m.
This commit is contained in:
Родитель
dcd37c9df2
Коммит
e73d71cbe8
|
@ -1723,10 +1723,10 @@ class Test {
|
|||
|
||||
mtouch.AssertOutputPattern ("Undefined symbols for architecture arm64:");
|
||||
mtouch.AssertOutputPattern (".*_OBJC_METACLASS_._Inexistent., referenced from:.*");
|
||||
mtouch.AssertOutputPattern (".*_OBJC_METACLASS_._Test_Subexistent in registrar.arm64.o.*");
|
||||
mtouch.AssertOutputPattern (".*_OBJC_METACLASS_._Test_Subexistent in registrar.o.*");
|
||||
mtouch.AssertOutputPattern (".*_OBJC_CLASS_._Inexistent., referenced from:.*");
|
||||
mtouch.AssertOutputPattern (".*_OBJC_CLASS_._Test_Subexistent in registrar.arm64.o.*");
|
||||
mtouch.AssertOutputPattern (".*objc-class-ref in registrar.arm64.o.*");
|
||||
mtouch.AssertOutputPattern (".*_OBJC_CLASS_._Test_Subexistent in registrar.o.*");
|
||||
mtouch.AssertOutputPattern (".*objc-class-ref in registrar.o.*");
|
||||
mtouch.AssertOutputPattern (".*ld: symbol.s. not found for architecture arm64.*");
|
||||
mtouch.AssertOutputPattern (".*clang: error: linker command failed with exit code 1 .use -v to see invocation.*");
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ bug-13945:
|
|||
@$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch -r:binding.dll app.exe --abi=armv7 -sdk "$(IOS_SDK_VERSION)" -dev:TheApp.app -sdkroot $(XCODE_DEVELOPER_ROOT) --cache=$(shell pwd)/cache -r:$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
|
||||
|
||||
# this will verify that binding.dll wasn't AOT'ed again - if binding.dll.armv7.s differ then the AOT compiler executed.
|
||||
@diff -u cache-first/binding.dll.armv7.s cache/binding.dll.armv7.s
|
||||
@diff -u cache-first/armv7/binding.dll.s cache/armv7/binding.dll.s
|
||||
@echo "$@: Success"
|
||||
|
||||
include $(TOP)/mk/rules.mk
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace Xamarin.Utils
|
|||
if (!Application.FastDev || !Application.RequiresPInvokeWrappers)
|
||||
return;
|
||||
|
||||
AddOtherFlag (Driver.Quote (Path.Combine (Application.Cache.Location, "libpinvokes." + abi.AsArchString () + ".dylib")));
|
||||
AddOtherFlag (Driver.Quote (Path.Combine (Application.Cache.Location, abi.AsArchString (), "libpinvokes.dylib")));
|
||||
}
|
||||
|
||||
public void AddFramework (string framework)
|
||||
|
|
|
@ -212,9 +212,9 @@ namespace Xamarin.Bundler {
|
|||
IEnumerable<BuildTask> CreateManagedToAssemblyTasks (string s, Abi abi, string build_dir)
|
||||
{
|
||||
var arch = abi.AsArchString ();
|
||||
var asm_dir = App.Cache.Location;
|
||||
var asm = Path.Combine (asm_dir, Path.GetFileName (s)) + "." + arch + ".s";
|
||||
var llvm_asm = Path.Combine (asm_dir, Path.GetFileName (s)) + "." + arch + "-llvm.s";
|
||||
var asm_dir = Path.Combine (App.Cache.Location, arch);
|
||||
var asm = Path.Combine (asm_dir, Path.GetFileName (s)) + ".s";
|
||||
var llvm_asm = Path.Combine (asm_dir, Path.GetFileName (s)) + "-llvm.s";
|
||||
var data = Path.Combine (asm_dir, Path.GetFileNameWithoutExtension (s)) + ".aotdata" + "." + arch;
|
||||
string llvm_ofile, llvm_aot_ofile = "";
|
||||
var is_llvm = (abi & Abi.LLVM) == Abi.LLVM;
|
||||
|
@ -237,11 +237,11 @@ namespace Xamarin.Bundler {
|
|||
//
|
||||
// In llvm-only mode, the AOT compiler emits a .bc file and no .s file for JITted code
|
||||
//
|
||||
llvm_ofile = Path.Combine (asm_dir, Path.GetFileName (s)) + "." + arch + ".bc";
|
||||
llvm_ofile = Path.Combine (asm_dir, Path.GetFileName (s)) + ".bc";
|
||||
outputs.Add (llvm_ofile);
|
||||
llvm_aot_ofile = llvm_ofile;
|
||||
} else {
|
||||
llvm_ofile = Path.Combine (asm_dir, Path.GetFileName (s)) + "." + arch + "-llvm.o";
|
||||
llvm_ofile = Path.Combine (asm_dir, Path.GetFileName (s)) + ".-llvm.o";
|
||||
outputs.Add (asm);
|
||||
|
||||
if (is_llvm) {
|
||||
|
|
|
@ -107,8 +107,8 @@ namespace Xamarin.Bundler
|
|||
{
|
||||
var app = target.App;
|
||||
var arch = abi.AsArchString ();
|
||||
var ofile = Path.Combine (app.Cache.Location, "main." + arch + ".o");
|
||||
var ifile = Path.Combine (app.Cache.Location, "main." + arch + ".m");
|
||||
var ofile = Path.Combine (app.Cache.Location, arch, "main.o");
|
||||
var ifile = Path.Combine (app.Cache.Location, arch, "main.m");
|
||||
|
||||
var files = assemblies.Select (v => v.FullPath);
|
||||
|
||||
|
@ -169,7 +169,7 @@ namespace Xamarin.Bundler
|
|||
{
|
||||
var arch = abi.AsArchString ();
|
||||
var ext = target.App.FastDev ? ".dylib" : ".o";
|
||||
var ofile = Path.Combine (target.App.Cache.Location, "lib" + Path.GetFileNameWithoutExtension (ifile) + "." + arch + ext);
|
||||
var ofile = Path.Combine (target.App.Cache.Location, arch, "lib" + Path.GetFileNameWithoutExtension (ifile) + ext);
|
||||
|
||||
if (!Application.IsUptodate (ifile, ofile)) {
|
||||
var task = new PinvokesTask ()
|
||||
|
@ -214,7 +214,7 @@ namespace Xamarin.Bundler
|
|||
{
|
||||
var app = target.App;
|
||||
var arch = abi.AsArchString ();
|
||||
var ofile = Path.Combine (app.Cache.Location, Path.GetFileNameWithoutExtension (ifile) + "." + arch + ".o");
|
||||
var ofile = Path.Combine (app.Cache.Location, arch, Path.GetFileNameWithoutExtension (ifile) + ".o");
|
||||
|
||||
if (!Application.IsUptodate (ifile, ofile)) {
|
||||
tasks.Add (new CompileRegistrarTask ()
|
||||
|
|
Загрузка…
Ссылка в новой задаче