diff --git a/sdks/builds/ios.mk b/sdks/builds/ios.mk index 2928935767f8..6505df0f8d56 100644 --- a/sdks/builds/ios.mk +++ b/sdks/builds/ios.mk @@ -275,6 +275,8 @@ clean-ios-llvm: # $(1): target (cross32 or cross64) # $(2): arch (arm or aarch64) # $(3): llvm (llvm32 or llvm64) +# $(4): configure target arch +# $(5): offsets tool --abi argument # # Flags: # ios_$(1)_AC_VARS @@ -284,6 +286,8 @@ clean-ios-llvm: # ios_$(1)_CONFIGURE_FLAGS define iOSCrossTemplate +_ios_$(1)_OFFSET_TOOL_ABI=$(5) + _ios_$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang _ios_$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++ @@ -310,7 +314,7 @@ _ios_$(1)_LDFLAGS= \ _ios_$(1)_CONFIGURE_FLAGS= \ $$(ios_$(1)_CONFIGURE_FLAGS) \ - --target=$(2)-darwin \ + --target=$(4) \ --cache-file=$$(TOP)/sdks/builds/ios-$(1).config.cache \ --prefix=$$(TOP)/sdks/out/ios-$(1) \ --disable-boehm \ @@ -322,7 +326,7 @@ _ios_$(1)_CONFIGURE_FLAGS= \ --enable-dtrace=yes \ --enable-icall-symbol-map \ --enable-minimal=com,remoting \ - --with-cross-offsets=$(2)-apple-darwin10.h \ + --with-cross-offsets=$(4).h \ --with-llvm=$$(TOP)/sdks/out/ios-$(3) _ios_$(1)_CONFIGURE_ENVIRONMENT= \ @@ -343,13 +347,13 @@ _ios_$(1)_CONFIGURE_ENVIRONMENT= \ $$(TOP)/sdks/builds/ios-$(1)/mono/utils/mono-dtrace.h: .stamp-ios-$(1)-configure $$(MAKE) -C $$(dir $$@) $$(notdir $$@) -$$(TOP)/sdks/builds/ios-$(1)/$(2)-apple-darwin10.h: .stamp-ios-$(1)-configure $$(TOP)/sdks/builds/ios-$(1)/mono/utils/mono-dtrace.h $$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe +$$(TOP)/sdks/builds/ios-$(1)/$(4).h: .stamp-ios-$(1)-configure $$(TOP)/sdks/builds/ios-$(1)/mono/utils/mono-dtrace.h $$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe cd $$(TOP)/sdks/builds/ios-$(1) && \ MONO_PATH=$(TOP)/tools/offsets-tool/CppSharp/osx_32 \ mono --arch=32 --debug $$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe \ - --gen-ios --abi $(2)-apple-darwin10 --out $$(TOP)/sdks/builds/ios-$(1)/ --mono $$(TOP) --targetdir $$(TOP)/sdks/builds/ios-$(1) + --gen-ios --abi $$(_ios_$(1)_OFFSET_TOOL_ABI) --outfile $$@ --mono $$(TOP) --targetdir $$(TOP)/sdks/builds/ios-$(1) -build-ios-$(1): $$(TOP)/sdks/builds/ios-$(1)/$(2)-apple-darwin10.h +build-ios-$(1): $$(TOP)/sdks/builds/ios-$(1)/$(4).h .PHONY: package-ios-$(1) package-ios-$(1): @@ -364,7 +368,8 @@ TARGETS += ios-$(1) endef ios_cross32_CONFIGURE_FLAGS=--build=i386-apple-darwin10 -$(eval $(call iOSCrossTemplate,cross32,arm,llvm32)) -$(eval $(call iOSCrossTemplate,cross64,aarch64,llvm64)) - +ios_crosswatch_CONFIGURE_FLAGS=--build=i386-apple-darwin10 --with-cooperative-gc=yes +$(eval $(call iOSCrossTemplate,cross32,arm,llvm32,arm-darwin,arm-apple-darwin10)) +$(eval $(call iOSCrossTemplate,cross64,aarch64,llvm64,aarch64-darwin,aarch64-apple-darwin10)) +$(eval $(call iOSCrossTemplate,crosswatch,armv7k,llvm32,armv7k-unknown-darwin,armv7k-apple-darwin)) diff --git a/tools/offsets-tool/MonoAotOffsetsDumper.cs b/tools/offsets-tool/MonoAotOffsetsDumper.cs index 20c90f557fda..2a8a932943bd 100644 --- a/tools/offsets-tool/MonoAotOffsetsDumper.cs +++ b/tools/offsets-tool/MonoAotOffsetsDumper.cs @@ -23,6 +23,7 @@ static class MonoAotOffsetsDumper static List Abis = new List (); static string OutputDir; + static string OutputFile; static string MonodroidDir = @""; static string AndroidNdkPath = @""; @@ -271,6 +272,7 @@ static void ParseCommandLineArgs(string[] args) var options = new Mono.Options.OptionSet () { { "abi=", "ABI triple to generate", v => Abis.Add(v) }, { "o|out=", "output directory", v => OutputDir = v }, + { "outfile=", "output directory", v => OutputFile = v }, { "maccore=", "include directory", v => MaccoreDir = v }, { "monodroid=", "top monodroid directory", v => MonodroidDir = v }, { "android-ndk=", "Path to Android NDK", v => AndroidNdkPath = v }, @@ -650,12 +652,18 @@ static string GetTargetPlatformDefine(TargetPlatform target) static void Dump(ASTContext ctx, ParserTargetInfo targetInfo, Target target) { - var targetFile = target.Triple; + string targetFile; - if (!string.IsNullOrEmpty (OutputDir)) - targetFile = Path.Combine (OutputDir, targetFile); + if (!string.IsNullOrEmpty (OutputFile)) { + targetFile = OutputFile; + } else { + targetFile = target.Triple; - targetFile += ".h"; + if (!string.IsNullOrEmpty (OutputDir)) + targetFile = Path.Combine (OutputDir, targetFile); + + targetFile += ".h"; + } using (var writer = new StreamWriter(targetFile)) //using (var writer = Console.Out)