Merge pull request #6100 from rolfbjarne/arm64_32-d16-2

[d16-2] Implement support for ARM64_32. Fixes #4864.
This commit is contained in:
Rolf Bjarne Kvinge 2019-05-22 22:50:50 -07:00 коммит произвёл GitHub
Родитель a07ee9a973 67eb2bce82
Коммит 48430a7876
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
46 изменённых файлов: 600 добавлений и 162 удалений

Просмотреть файл

@ -226,7 +226,9 @@ SIMULATORWATCH_OBJC_CFLAGS = $(SIMULATORWATCH_CFLAGS) $(COMMON_SIMULATOR_OBJC_CF
DEVICEWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchOS.platform/Developer/SDKs/WatchOS$(WATCH_SDK_VERSION).sdk
DEVICEWATCH_CFLAGS = -arch armv7k -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) $(CFLAGS) -fembed-bitcode $(IOS_COMMON_DEFINES)
DEVICEWATCH64_32_CFLAGS = -arch arm64_32 -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) $(CFLAGS) -fembed-bitcode $(IOS_COMMON_DEFINES)
DEVICEWATCH_OBJC_CFLAGS = $(DEVICEWATCH_CFLAGS) $(DEVICE_OBJC_CFLAGS)
DEVICEWATCH64_32_OBJC_CFLAGS = $(DEVICEWATCH64_32_CFLAGS) $(DEVICE_OBJC_CFLAGS)
# TVOS

Просмотреть файл

@ -142,6 +142,7 @@
<string>http-client-handlers</string>
<string>mono-symbol-archive</string>
<string>sgen-concurrent-gc</string>
<string>arm64_32</string>
</array>
<key>Optimizations</key>
<dict>

Просмотреть файл

@ -1301,15 +1301,16 @@ WATCHOS_BIN_PATH = $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/u
ifdef INCLUDE_WATCH
ifdef INCLUDE_DEVICE
build:: build-targetwatch
clean-local:: clean-targetwatch
build:: build-targetwatch build-targetwatch64_32
clean-local:: clean-targetwatch clean-targetwatch64_32
install-local:: install-watchos
all-local:: install-watchos
targetwatch: build-targetwatch install-watchos
watchos:: targetwatch
targetwatch64_32: build-targetwatch64_32 install-watch64_32
watchos:: targetwatch targetwatch64_32
.PHONY: targetwatch
.PHONY: targetwatch targetwatch64_32
.stamp-build-targetwatch: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targetwatch $(SDK_ARGS)
@ -1317,39 +1318,84 @@ watchos:: targetwatch
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-targetwatch-release/* $(BUILD_DESTDIR)/targetwatch
$(Q) touch $@
.stamp-build-targetwatch64_32: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targetwatch64_32 $(SDK_ARGS)
$(Q) mkdir -p $(BUILD_DESTDIR)/targetwatch64_32
$(Q) $(CP) -r $(SDK_DESTDIR)/ios-targetwatch64_32-release/* $(BUILD_DESTDIR)/targetwatch64_32
$(Q) touch $@
build-targetwatch: .stamp-build-targetwatch
build-targetwatch64_32: .stamp-build-targetwatch64_32
clean-targetwatch:
$(Q) rm -rf $(BUILD_DESTDIR)/targetwatch .stamp-*-targetwatch
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-targetwatch $(SDK_ARGS)
setup-watchos: setup-targetwatch
build-watchos: build-targetwatch
clean-watchos: clean-targetwatch
clean-targetwatch64_32:
$(Q) rm -rf $(BUILD_DESTDIR)/targetwatch64_32 .stamp-*-targetwatch64_32
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-targetwatch64_32 $(SDK_ARGS)
WATCHOS_TARGET_LIBMONOSGEN = $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.a
WATCHOS_TARGET_SHAREDMONOSGEN = $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.dylib
WATCHOS_TARGET_LIBLOGPROFILER = $(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log-static.a
WATCHOS_TARGET_LIBMONOEEINTERP = $(BUILD_DESTDIR)/targetwatch/lib/libmono-ee-interp.a
WATCHOS_TARGET_LIBMONOICALLTABLE = $(BUILD_DESTDIR)/targetwatch/lib/libmono-icall-table.a
WATCHOS_TARGET_LIBMONOILGEN = $(BUILD_DESTDIR)/targetwatch/lib/libmono-ilgen.a
WATCHOS_TARGET_SHAREDLIBLOGPROFILER = $(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log.0.dylib
WATCHOS_TARGET_LIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-compat.a
WATCHOS_TARGET_LIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.a
WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-compat.dylib
WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED = $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.dylib
setup-watchos: setup-targetwatch setup-targetwatch64_32
build-watchos: build-targetwatch build-targetwatch64_32
clean-watchos: clean-targetwatch clean-targetwatch64_32
$(WATCHOS_TARGET_LIBMONOSGEN): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDMONOSGEN): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBLOGPROFILER): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONOEEINTERP): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONOICALLTABLE): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONOILGEN): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDLIBLOGPROFILER): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONONATIVECOMPAT): .stamp-build-targetwatch
$(WATCHOS_TARGET_LIBMONONATIVEUNIFIED): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT): .stamp-build-targetwatch
$(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED): .stamp-build-targetwatch
WATCHOS_TARGET_LIBMONOSGEN = \
$(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.a \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmonosgen-2.0.a
WATCHOS_TARGET_SHAREDMONOSGEN = \
$(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.dylib \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmonosgen-2.0.dylib
WATCHOS_TARGET_LIBLOGPROFILER = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log-static.a \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-profiler-log-static.a
WATCHOS_TARGET_LIBMONOEEINTERP = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-ee-interp.a \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-ee-interp.a
WATCHOS_TARGET_LIBMONOICALLTABLE = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-icall-table.a \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-icall-table.a
WATCHOS_TARGET_LIBMONOILGEN = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-ilgen.a \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-ilgen.a
WATCHOS_TARGET_SHAREDLIBLOGPROFILER = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log.0.dylib \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-profiler-log.0.dylib
WATCHOS_TARGET_LIBMONONATIVECOMPAT = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-native-compat.a \
WATCHOS_TARGET_LIBMONONATIVEUNIFIED = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.a \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-native.a \
WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-native-compat.dylib \
WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED = \
$(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.dylib \
$(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-native.dylib \
WATCHOS_TARGET_MONOFRAMEWORK = \
$(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono \
$(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/Mono
$(WATCHOS_TARGET_LIBMONOSGEN): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_SHAREDMONOSGEN): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_LIBLOGPROFILER): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_LIBMONOEEINTERP): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_LIBMONOICALLTABLE): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_LIBMONOILGEN): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_SHAREDLIBLOGPROFILER): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_LIBMONONATIVECOMPAT): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_LIBMONONATIVEUNIFIED): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_SHAREDLIBMONONATIVECOMPAT): .stamp-build-targetwatch .stamp-build-targetwatch64_32
$(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED): .stamp-build-targetwatch .stamp-build-targetwatch64_32
device:: watchos
@ -1376,7 +1422,9 @@ $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmonosgen-2.0.a: $(WATCHOS_TARGET
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONOSGEN) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmonosgen-2.0.dylib: $(WATCHOS_TARGET_SHAREDMONOSGEN) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q_STRIP) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDMONOSGEN) -m -o $@
$(Q_STRIP) $(WATCHOS_BIN_PATH)/bitcode_strip $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.dylib -m -o $(BUILD_DESTDIR)/targetwatch/tmp-lib/libmonosgen-2.0.dylib
$(Q_STRIP) $(WATCHOS_BIN_PATH)/bitcode_strip $(BUILD_DESTDIR)/targetwatch64_32/lib/libmonosgen-2.0.dylib -m -o $(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/libmonosgen-2.0.dylib
$(Q_STRIP) $(WATCHOS_BIN_PATH)/lipo $(BUILD_DESTDIR)/targetwatch/tmp-lib/libmonosgen-2.0.dylib $(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/libmonosgen-2.0.dylib -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmonosgen-2.0.dylib $@
$(Q) dsymutil -t 4 -o $@.dSYM $@
@ -1393,8 +1441,13 @@ $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-ilgen.a: $(WATCHOS_TARGET_L
$(Q) $(WATCHOS_BIN_PATH)/lipo $(WATCHOS_TARGET_LIBMONOILGEN) -create -output $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-profiler-log.dylib: $(WATCHOS_TARGET_SHAREDLIBLOGPROFILER) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDLIBLOGPROFILER) -m -o $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-profiler-log.dylib -change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(BUILD_DESTDIR)/targetwatch/lib/libmono-profiler-log.0.dylib -m -o $(BUILD_DESTDIR)/targetwatch/tmp-lib/libmono-profiler-log.0.dylib
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-profiler-log.0.dylib -m -o $(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/libmono-profiler-log.0.dylib
$(Q) $(WATCHOS_BIN_PATH)/lipo $(BUILD_DESTDIR)/targetwatch/tmp-lib/libmono-profiler-log.0.dylib $(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/libmono-profiler-log.0.dylib -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-profiler-log.dylib \
-change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib \
-change $(SDK_DESTDIR)/ios-targetwatch64_32-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib \
$@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-compat.a: $(WATCHOS_TARGET_LIBMONONATIVECOMPAT) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
@ -1409,15 +1462,22 @@ $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-compat.dylib: $(WATC
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib/libmono-native-unified.dylib: $(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib
$(Q) $(WATCHOS_BIN_PATH)/bitcode_strip $(WATCHOS_TARGET_SHAREDLIBMONONATIVEUNIFIED) -m -o $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-unified.dylib -change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmono-native-unified.dylib @rpath/libmono-native-unified.dylib -change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib $@
$(Q_STRIP) $(WATCHOS_BIN_PATH)/bitcode_strip $(BUILD_DESTDIR)/targetwatch/lib/libmono-native-unified.dylib -m -o $(BUILD_DESTDIR)/targetwatch/tmp-lib/libmono-native-unified.dylib
$(Q_STRIP) $(WATCHOS_BIN_PATH)/bitcode_strip $(BUILD_DESTDIR)/targetwatch64_32/lib/libmono-native.dylib -m -o $(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/libmono-native.dylib
$(Q_STRIP) $(WATCHOS_BIN_PATH)/lipo $(BUILD_DESTDIR)/targetwatch/tmp-lib/libmono-native-unified.dylib $(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/libmono-native.dylib -create -output $@
$(Q) $(WATCHOS_BIN_PATH)/install_name_tool -id @rpath/libmono-native-unified.dylib \
-change $(SDK_DESTDIR)/ios-targetwatch64_32-release/lib/libmono-native.dylib @rpath/libmono-native-unified.dylib \
-change $(SDK_DESTDIR)/ios-targetwatch64_32-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib \
-change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmono-native-unified.dylib @rpath/libmono-native-unified.dylib \
-change $(SDK_DESTDIR)/ios-targetwatch-release/lib/libmonosgen-2.0.1.dylib @rpath/libmonosgen-2.0.dylib \
$@
$(Q) dsymutil -t 4 -o $@.dSYM $@
$(WATCHOS_DIRECTORIES):
$(Q) mkdir -p $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Mono: $(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework
$(Q) $(CP) $< $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Mono: $(WATCHOS_TARGET_MONOFRAMEWORK) | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework
$(Q) lipo $(WATCHOS_TARGET_MONOFRAMEWORK) -create -output $@
$(Q) dsymutil -t 4 -o $(patsubst %/,%,$(dir $@)).dSYM $@
$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framework-watchos.Info.plist | $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework
@ -1426,6 +1486,9 @@ $(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.
$(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono: $(BUILD_DESTDIR)/targetwatch/lib/libmonosgen-2.0.a
$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $< $@ -arch armv7k -install_name @rpath/Mono.framework/Mono -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) -lc++ -fembed-bitcode
$(BUILD_DESTDIR)/targetwatch64_32/tmp-lib/Mono: $(BUILD_DESTDIR)/targetwatch64_32/lib/libmonosgen-2.0.a
$(Q_GEN) CC="$(IOS_CC)" ./create-shared-library.sh $< $@ -arch arm64_32 -install_name @rpath/Mono.framework/Mono -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) -lc++ -fembed-bitcode
install-watchos: $(WATCHOS_TARGETS)
endif # INCLUDE_DEVICE

2
external/mono поставляемый

@ -1 +1 @@
Subproject commit 06c3f553122b17457147695475957ead3ec90b6a
Subproject commit 16c6ac81b39bdb26786c2fda155a0a3500961798

Просмотреть файл

@ -12,6 +12,7 @@ DEV64_I := $(COMMON_I)
SIMW_I := $(COMMON_I)
DEVW_I := $(COMMON_I)
DEVW64_32_I := $(COMMON_I)
SIM_TV_I:= $(COMMON_I)
DEV_TV_I:= $(COMMON_I)
@ -117,6 +118,18 @@ define NativeCompilationTemplate
.libs/watchos/%$(1).armv7k.framework: | .libs/watchos
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks -fapplication-extension
.libs/watchos/%$(1).arm64_32.o: %.m $(EXTRA_DEPENDENCIES) | .libs/watchos
$$(call Q_2,OBJC, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_OBJC_CFLAGS) $$(EXTRA_DEFINES) $(DEVW64_32_I) -g $(2) -c $$< -o $$@
.libs/watchos/%$(1).arm64_32.o: %.c $(EXTRA_DEPENDENCIES) | .libs/watchos
$$(call Q_2,CC, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_CFLAGS) $$(EXTRA_DEFINES) $(DEVW64_32_I) -g $(2) -c $$< -o $$@
.libs/watchos/%$(1).arm64_32.dylib: | .libs/watchos
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -L$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/usr/lib -fapplication-extension
.libs/watchos/%$(1).arm64_32.framework: | .libs/watchos
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks -fapplication-extension
## tv simulator
.libs/tvos/%$(1).x86_64.o: %.m $(EXTRA_DEPENDENCIES) | .libs/tvos

Просмотреть файл

@ -24,6 +24,7 @@ namespace Xamarin.iOS.Tasks
ARMv7s = 16,
ARMv7k = 32,
ARM64 = 64,
ARM64_32 = 128,
// Note: needed for backwards compatability
ARMv6_ARMv7 = ARMv6 | ARMv7,
@ -486,6 +487,9 @@ namespace Xamarin.iOS.Tasks
if (architectures.HasFlag (TargetArchitecture.ARMv7k))
abi += (abi.Length > 0 ? "," : "") + "armv7k" + llvm;
if (architectures.HasFlag (TargetArchitecture.ARM64_32))
abi += (abi.Length > 0 ? "," : "") + "arm64_32" + llvm;
if (string.IsNullOrEmpty (abi))
abi = "armv7" + llvm + thumb;
}

Просмотреть файл

@ -28,7 +28,7 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved.
<!-- Enable nuget package conflict resolution -->
<ResolveAssemblyConflicts>true</ResolveAssemblyConflicts>
<UseFakeWatchOS4_3Sdk Condition="'$(UseFakeWatchOS4_3Sdk)' == ''">True</UseFakeWatchOS4_3Sdk>
<UseFakeWatchOS4_3Sdk Condition="'$(UseFakeWatchOS4_3Sdk)' == ''">False</UseFakeWatchOS4_3Sdk>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\iOS\Xamarin.iOS.Common.targets" />

Просмотреть файл

@ -194,7 +194,7 @@ $(eval $(call PlatformTemplate,ios,IOS,armv7 armv7s arm64,x86 x86_64,IOS,IPHONE)
endif
ifdef INCLUDE_WATCH
$(eval $(call PlatformTemplate,watchos,WATCHOS,armv7k,x86,WATCH,WATCH))
$(eval $(call PlatformTemplate,watchos,WATCHOS,armv7k arm64_32,x86,WATCH,WATCH))
endif
ifdef INCLUDE_TVOS
@ -333,6 +333,7 @@ armv7_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7.o,$$($(2)_SOURCE_
armv7s_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7s.o,$$($(2)_SOURCE_STEMS))
armv7k_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7k.o,$$($(2)_SOURCE_STEMS))
arm64_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).arm64.o,$$($(2)_SOURCE_STEMS))
arm64_32_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).arm64_32.o,$$($(2)_SOURCE_STEMS))
$$(foreach arch,$$($(2)_ARCHITECTURES),$$(eval $$(call LibXamarinArchTemplate,$(1),$(2),$(3),$(4),$$(arch))))
@ -358,6 +359,9 @@ $$(foreach arch,$$($(2)_ARCHITECTURES),$$(eval $$(call LibXamarinArchTemplate,$(
.libs/$(1)/libxamarin$(4).armv7k.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).armv7k.dylib: $$(armv7k_$(1)$(3)_OBJECTS)
.libs/$(1)/libxamarin$(4).arm64_32.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
.libs/$(1)/libxamarin$(4).arm64_32.dylib: $$(arm64_32_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).x86.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).x86.framework: $$(x86_$(1)$(3)_OBJECTS)
@ -375,6 +379,9 @@ $$(foreach arch,$$($(2)_ARCHITECTURES),$$(eval $$(call LibXamarinArchTemplate,$(
.libs/$(1)/Xamarin$(4).armv7k.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).armv7k.framework: $$(armv7k_$(1)$(3)_OBJECTS)
.libs/$(1)/Xamarin$(4).arm64_32.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
.libs/$(1)/Xamarin$(4).arm64_32.framework: $$(arm64_32_$(1)$(3)_OBJECTS)
endef
$(eval $(call LibXamarinTemplate,ios,IOS))

Просмотреть файл

@ -226,7 +226,7 @@ struct MPSImageHistogramInfoWrapper {
// entire struct on a 16-byte boundary, which doesn't match how we've
// defined it in managed code (explicit layout, but no specific alignment).
// So we need to manually pad the struct to match the managed definition.
#if defined (__x86_64__) || defined (__arm64__)
#if !defined(__ILP32__)
uint8_t dummy[7];
#else
uint8_t dummy[11];

Просмотреть файл

@ -57,16 +57,20 @@ namespace CoreGraphics {
/* CGColorSpaceRef __nullable */ IntPtr space3, CGColorConversionInfoTransformType transform3, CGColorRenderingIntent intent3,
IntPtr lastSpaceMarker);
#if !MONOMAC && !WATCH
#if !MONOMAC
// https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html
// Declare dummies until we're on the stack then the arguments
// <quote>C language requires arguments smaller than int to be promoted before a call, but beyond that, unused bytes on the stack are not specified by this ABI</quote>
// The 'transformX' argument is a CGColorConversionInfoTransformType, which is defined as uint (uint32_t in the header),
// but since each parameter must be pointer-sized (to occupy the right amount of stack space),
// we define it as nuint (and not the enum type, which is 32-bit even on 64-bit platforms).
// Same for the 'intentX' argument (except that it's signed instead of unsigned).
[DllImport(Constants.CoreGraphicsLibrary, EntryPoint="CGColorConversionInfoCreateFromList")]
extern static /* CGColorConversionInfoRef __nullable */ IntPtr CGColorConversionInfoCreateFromList_arm64 (/* __nullable CFDictionaryRef */ IntPtr options,
IntPtr space1, long transform1, long intent1, // varargs starts after them
IntPtr space1, nuint transform1, nint intent1, // varargs starts after them
IntPtr dummy4, IntPtr dummy5, IntPtr dummy6, IntPtr dummy7, // dummies so the rest goes to the stack
IntPtr space2, long transform2, long intent2,
IntPtr space3, long transform3, long intent3,
IntPtr space2, nuint transform2, nint intent2,
IntPtr space3, nuint transform3, nint intent3,
IntPtr lastSpaceMarker);
#endif
@ -92,12 +96,12 @@ namespace CoreGraphics {
var first = triples [0]; // there's always one
var second = triples.Length > 1 ? triples [1] : empty;
var third = triples.Length > 2 ? triples [2] : empty;
#if !MONOMAC && !WATCH
#if !MONOMAC
if (Runtime.IsARM64CallingConvention) {
Handle = CGColorConversionInfoCreateFromList_arm64 (o, NativeObjectHelper.GetHandle (first.Space), (long) first.Transform, (long) first.Intent,
Handle = CGColorConversionInfoCreateFromList_arm64 (o, NativeObjectHelper.GetHandle (first.Space), (uint) first.Transform, (int) first.Intent,
IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero,
NativeObjectHelper.GetHandle (second.Space), (long) second.Transform, (long) second.Intent,
NativeObjectHelper.GetHandle (third.Space), (long) third.Transform, (long) third.Intent,
NativeObjectHelper.GetHandle (second.Space), (uint) second.Transform, (int) second.Intent,
NativeObjectHelper.GetHandle (third.Space), (uint) third.Transform, (int) third.Intent,
IntPtr.Zero);
} else {
#endif
@ -105,7 +109,7 @@ namespace CoreGraphics {
NativeObjectHelper.GetHandle (second.Space), second.Transform, second.Intent,
NativeObjectHelper.GetHandle (third.Space), third.Transform, third.Intent,
IntPtr.Zero);
#if !MONOMAC && !WATCH
#if !MONOMAC
}
#endif
if (Handle == IntPtr.Zero)

Просмотреть файл

@ -1573,7 +1573,7 @@ namespace ObjCRuntime {
extern static void NSLog (IntPtr format, [MarshalAs (UnmanagedType.LPStr)] string s);
#endif
#if !MONOMAC && !WATCHOS
#if !MONOMAC
[DllImport (Constants.FoundationLibrary, EntryPoint = "NSLog")]
extern static void NSLog_arm64 (IntPtr format, IntPtr p2, IntPtr p3, IntPtr p4, IntPtr p5, IntPtr p6, IntPtr p7, IntPtr p8, [MarshalAs (UnmanagedType.LPStr)] string s);
#endif
@ -1583,7 +1583,7 @@ namespace ObjCRuntime {
{
var fmt = NSString.CreateNative ("%s");
var val = (args == null || args.Length == 0) ? format : string.Format (format, args);
#if !MONOMAC && !WATCHOS
#if !MONOMAC
if (IsARM64CallingConvention)
NSLog_arm64 (fmt, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, val);
else

Просмотреть файл

@ -3863,7 +3863,12 @@ public partial class Generator : IMemberGatherer {
if (is_stret_multi) {
print ("if (Runtime.Arch == Arch.DEVICE) {");
indent++;
print ("if (IntPtr.Size == 8) {");
if (BindingTouch.CurrentPlatform == PlatformName.WatchOS) {
print ("if (global::ObjCRuntime.Runtime.IsARM64CallingConvention) {");
} else {
print ("if (IntPtr.Size == 8) {");
}
indent++;
GenerateInvoke (false, supercall, mi, minfo, selector, args [index64], assign_to_temp, category_type, false, EnumMode.Bit64);
indent--;

Просмотреть файл

@ -15,7 +15,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -24,7 +24,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>

Просмотреть файл

@ -17,7 +17,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -26,7 +26,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>

Просмотреть файл

@ -29,7 +29,7 @@
<MtouchProfiling>true</MtouchProfiling>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' Or '$(Configuration)|$(Platform)' == 'Release32|iPhone' Or '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<OutputPath>bin\%NAME%-watchos-app\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
@ -50,7 +50,7 @@
<MtouchLink>None</MtouchLink>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug32|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug64_32|iPhone' ">
<OutputPath>bin\%NAME%-watchos-app\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>

Просмотреть файл

@ -56,12 +56,37 @@
<MtouchDebug>True</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchExtraArgs></MtouchExtraArgs>
<MtouchArch>ARMv7k</MtouchArch>
<MtouchArch>ARMv7k, ARM64_32</MtouchArch>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<IpaPackageName>
</IpaPackageName>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchI18n>cjk,mideast,other,rare,west</MtouchI18n>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug64_32|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>bin\%NAME%-watchos-extension\iPhone\Debug64_32-watchos-extension</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchDebug>true</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchArch>ARM64_32</MtouchArch>
<MtouchExtraArgs></MtouchExtraArgs>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>bin\%NAME%-watchos-extension\iPhone\Debug32-watchos-extension</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchDebug>true</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchArch>ARMv7k</MtouchArch>
<MtouchExtraArgs></MtouchExtraArgs>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
@ -76,6 +101,31 @@
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchEnableBitcode>true</MtouchEnableBitcode>
<MtouchI18n>cjk,mideast,other,rare,west</MtouchI18n>
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<Optimize>true</Optimize>
<OutputPath>bin\%NAME%-watchos-extension\iPhone\Release64_32-watchos-extension</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchExtraArgs>--nostrip --nosymbolstrip: --aot-options=-O=float32 --gcc_flags='-fembed-bitcode-marker'</MtouchExtraArgs>
<MtouchArch>ARM64_32</MtouchArch>
<MtouchUseLlvm>True</MtouchUseLlvm>
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release32|iPhone' ">
<Optimize>true</Optimize>
<OutputPath>bin\%NAME%-watchos-extension\iPhone\Release32-watchos-extension</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchExtraArgs>--nostrip --nosymbolstrip: --aot-options=-O=float32 --gcc_flags='-fembed-bitcode-marker'</MtouchExtraArgs>
<MtouchArch>ARMv7k</MtouchArch>
<MtouchUseLlvm>True</MtouchUseLlvm>
<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Mono.Options" Version="5.3.0.1" />

Просмотреть файл

@ -26,7 +26,7 @@
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' Or '$(Configuration)|$(Platform)' == 'Release32|iPhone' Or '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<OutputPath>bin\%NAME%\iPhone\$(Configuration)-watchos</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
@ -48,7 +48,7 @@
<MtouchLink>None</MtouchLink>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug32|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug64_32|iPhone' ">
<OutputPath>bin\%NAME%\iPhone\$(Configuration)-watchos</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>

Просмотреть файл

@ -26,7 +26,7 @@
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' Or '$(Configuration)|$(Platform)' == 'Release32|iPhone' Or '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
@ -48,7 +48,7 @@
<MtouchLink>None</MtouchLink>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug32|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug64_32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>

Просмотреть файл

@ -25,6 +25,7 @@ namespace monotouchtestWatchKitExtension
{
bool running;
Xamarin.iOS.UnitTests.TestRunner runner;
HttpTextWriter http_writer;
[Action ("runTests:")]
partial void RunTests (NSObject obj);
@ -93,10 +94,14 @@ namespace monotouchtestWatchKitExtension
{
var options = ApplicationOptions.Current;
TextWriter writer = null;
if (!string.IsNullOrEmpty (options.HostName) && string.IsNullOrEmpty(options.LogFile))
writer = new HttpTextWriter () { HostName = options.HostName, Port = options.HostPort };
if (!string.IsNullOrEmpty (options.LogFile))
if (!string.IsNullOrEmpty (options.HostName) && string.IsNullOrEmpty (options.LogFile)) {
http_writer = new HttpTextWriter () { HostName = options.HostName.Split (',')[0], Port = options.HostPort };
Console.WriteLine ("Sending results to {0}:{1} using HTTP", http_writer.HostName, http_writer.Port);
http_writer.Open ();
writer = http_writer;
} else if (!string.IsNullOrEmpty (options.LogFile)) {
writer = new StreamWriter (options.LogFile);
}
// we generate the logs in two different ways depending if the generate xml flag was
// provided. If it was, we will write the xml file to the tcp writer if present, else
@ -157,8 +162,16 @@ namespace monotouchtestWatchKitExtension
logger.Info ($"Xml result can be found {resultsFilePath}");
}
logger.Info ($"Tests run: {runner.TotalTests} Passed: {runner.PassedTests} Inconclusive: {runner.InconclusiveTests} Failed: {runner.FailedTests} Ignored: {runner.FilteredTests}");
if (options.TerminateAfterExecution)
TerminateWithSuccess ();
if (options.TerminateAfterExecution) {
var writer_finished_task = http_writer?.FinishedTask;
http_writer?.Close ();
Task.Run (async () => {
if (writer_finished_task != null) {
await writer_finished_task;
}
TerminateWithSuccess ();
});
}
});
});
}

Просмотреть файл

@ -15,7 +15,7 @@
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
<DefineConstants>XAMCORE_2_0;XAMCORE_3_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -25,7 +25,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>

Просмотреть файл

@ -17,7 +17,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -27,7 +27,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>

Просмотреть файл

@ -17,7 +17,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -27,7 +27,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>

Просмотреть файл

@ -17,7 +17,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -27,7 +27,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>

Просмотреть файл

@ -104,6 +104,7 @@ namespace Xamarin.Tests
Version alternate_version = null;
Version mono_native_compat_version;
Version mono_native_unified_version;
Version alternate_mono_native_unified_version = null;
switch (load_command) {
case MachO.LoadCommands.MinMacOSX:
version = SdkVersions.MinOSXVersion;
@ -129,8 +130,12 @@ namespace Xamarin.Tests
break;
case MachO.LoadCommands.MinwatchOS:
version = SdkVersions.MinWatchOSVersion;
if (device)
alternate_version = new Version (5, 1, 0); // arm64_32 has min OS 5.1
mono_native_compat_version = SdkVersions.MinWatchOSVersion;
mono_native_unified_version = new Version (5, 0, 0);
if (device)
alternate_mono_native_unified_version = new Version (5, 1, 0); // armv7k has 5.0, arm64_32 has 5.1
break;
default:
throw new NotImplementedException (load_command.ToString ());
@ -141,6 +146,8 @@ namespace Xamarin.Tests
mono_native_unified_version = mono_native_unified_version.WithBuild ();
if (alternate_version == null)
alternate_version = version;
if (alternate_mono_native_unified_version == null)
alternate_mono_native_unified_version = mono_native_unified_version;
switch (Path.GetFileName (machoFile)) {
case "libmono-native-compat.dylib":
@ -150,7 +157,7 @@ namespace Xamarin.Tests
break;
case "libmono-native-unified.dylib":
case "libmono-native-unified.a":
if (mono_native_unified_version != lc_min_version)
if (mono_native_unified_version != lc_min_version && alternate_mono_native_unified_version != lc_min_version)
failed.Add ($"Unexpected minOS version (expected {mono_native_unified_version}, found {lc_min_version}) in {machoFile} ({slice.Filename}).");
break;
default:

Просмотреть файл

@ -17,7 +17,7 @@
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)-unified</IntermediateOutputPath>
<DefineConstants>XAMCORE_2_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Debug32' Or '$(Configuration)' == 'Debug64' Or '$(Configuration)' == 'Debug64_32' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
@ -27,7 +27,7 @@
<PlatformTarget>
</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' ">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release32' Or '$(Configuration)' == 'Release64' Or '$(Configuration)' == 'Release-bitcode' Or '$(Configuration)' == 'Release64_32' ">
<Optimize>true</Optimize>
<OutputPath>bin\Any CPU\$(Configuration)-unified</OutputPath>
<DefineConstants>;$(DefineConstants)</DefineConstants>

Просмотреть файл

@ -225,6 +225,11 @@ namespace Introspection {
case "INGetRestaurantGuestIntentResponse": // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Unable to initialize 'INGetRestaurantGuestIntentResponse'. Please make sure that your intent definition file is valid.
return TestRuntime.CheckXcodeVersion (10,0);
case "CMMovementDisorderManager": // Not available in simulator, added info to radar://41110708
#if __WATCHOS__
// Doesn't exist in the simulator; aborts on device if the required entitlement isn't available.
return true;
#endif
return Runtime.Arch == Arch.SIMULATOR;
case "RPSystemBroadcastPickerView": // Symbol not available in simulator
return Runtime.Arch == Arch.SIMULATOR;
default:

Просмотреть файл

@ -64,10 +64,10 @@ namespace Introspection {
case "MPSSetHeapCacheDuration":
return simulator;
// it's not needed for ARM64 and Apple does not have stubs for them in libobjc.dylib
// it's not needed for ARM64/ARM64_32 and Apple does not have stubs for them in libobjc.dylib
case "objc_msgSend_stret":
case "objc_msgSendSuper_stret":
return IntPtr.Size == 8 && !simulator;
return !simulator;
default:
return base.Skip (symbolName);

Просмотреть файл

@ -82,6 +82,17 @@ namespace Introspection {
// but that web page doesn't explain anything (it's mostly empty, so this is probably just lagging documentation)
// I also tried enabling every entitlement in Xcode, but it still didn't work.
return true;
#if __WATCHOS__ && !XAMCORE_4_0
case "INCarAirCirculationModeResolutionResult":
case "INCarAudioSourceResolutionResult":
case "INCarDefrosterResolutionResult":
case "INCarSeatResolutionResult":
case "INRadioTypeResolutionResult":
case "INRelativeSettingResolutionResult":
case "INRelativeReferenceResolutionResult":
// These were bound by mistake, and they're gone in XAMCORE_4_0.
return true;
#endif
}
return base.Skip (type);

Просмотреть файл

@ -1389,7 +1389,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
#if MONOMAC
var boolEncoding = "c";
#else
var boolEncoding = (IntPtr.Size == 8 || TrampolineTest.IsArmv7k) ? "B" : "c";
var boolEncoding = (IntPtr.Size == 8 || TrampolineTest.IsArmv7k || TrampolineTest.IsArm64CallingConvention) ? "B" : "c";
#endif
var exp = new string [] { "@", ":", "^v", "C", "c", "s", "s", "S", "i", "I", "q", "Q", "f", "d", boolEncoding, "@", ":", "#" };

Просмотреть файл

@ -62,10 +62,16 @@ namespace MonoTouchFixtures.ObjCRuntime {
}
#endif
public static bool IsArm64CallingConvention {
get {
return Runtime.IsARM64CallingConvention;
}
}
public static bool IsArmv7k {
get {
#if __WATCHOS__
return Runtime.Arch == Arch.DEVICE;
return Runtime.Arch == Arch.DEVICE && !IsArm64CallingConvention;
#else
return false;
#endif
@ -78,7 +84,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
{
CMTimeRange tr;
using (var obj = new StretTrampolines ()) {
if (IsArm64) {
if (IsArm64CallingConvention) {
tr = CMTimeRange_objc_msgSend (obj.Handle, Selector.GetHandle ("myTimeRange"));
} else {
CMTimeRange_objc_msgSend (out tr, obj.Handle, Selector.GetHandle ("myTimeRange"));
@ -221,21 +227,21 @@ namespace MonoTouchFixtures.ObjCRuntime {
int i;
rect2 = new RectangleF (1.2f, 2.3f, 3.4f, 4.5f);
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = RectangleF_objc_msgSend_IntPtr_IntPtr_RectangleF (obj.Handle, new Selector ("testRectangleF_string_string_RectangleF:b:c:").Handle, new NSString ("a").Handle, new NSString ("b").Handle, rect2);
} else {
RectangleF_objc_msgSend_stret_IntPtr_IntPtr_RectangleF (out rect, obj.Handle, new Selector ("testRectangleF_string_string_RectangleF:b:c:").Handle, new NSString ("a").Handle, new NSString ("b").Handle, rect2);
}
Assert.That (rect == new RectangleF (rect2.X * pi, rect2.Y * pi, rect2.Width * pi, rect2.Height * pi), "#testRectangleF_string_string_RectangleF:b:c:");
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend (obj.Handle, new Selector ("testRectangleF").Handle);
} else {
Messaging.RectangleF_objc_msgSend_stret (out rect, obj.Handle, new Selector ("testRectangleF").Handle);
}
Assert.That (rect == new RectangleF (1.2f, 2.3f, 3.4f, 4.5f), "#testRectangleF");
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend (class_ptr, new Selector ("staticTestRectangleF").Handle);
} else {
Messaging.RectangleF_objc_msgSend_stret (out rect, class_ptr, new Selector ("staticTestRectangleF").Handle);
@ -243,14 +249,14 @@ namespace MonoTouchFixtures.ObjCRuntime {
Assert.That (rect == new RectangleF (1.2f, 2.3f, 3.4f, 4.5f), "#static testRectangleF");
i = 152;
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_int (obj.Handle, new Selector ("testRectangleF_int:").Handle, 152);
} else {
Messaging.RectangleF_objc_msgSend_stret_int (out rect, obj.Handle, new Selector ("testRectangleF_int:").Handle, 152);
}
Assert.That (rect == new RectangleF (i + .1f, i + .2f, i + .3f, i + .4f), "#ret RectF-int", "#testRectangleF_int:");
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_IntPtr (obj.Handle, new Selector ("testRectangleF_IntPtr:").Handle, tmp_obj.Handle);
} else {
Messaging.RectangleF_objc_msgSend_stret_IntPtr (out rect, obj.Handle, new Selector ("testRectangleF_IntPtr:").Handle, tmp_obj.Handle);
@ -259,7 +265,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
#if !__TVOS__
mkregion = new MKCoordinateRegion (new CLLocationCoordinate2D (123.456, 345.678), new MKCoordinateSpan (987.654, 654.321));
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_MKCoordinateRegion_IntPtr (obj.Handle, new Selector ("testRectangleF_MCCoordinateRegion_IntPtr:str:").Handle, mkregion, tmp_obj.Handle);
} else {
Messaging.RectangleF_objc_msgSend_stret_MKCoordinateRegion_IntPtr (out rect, obj.Handle, new Selector ("testRectangleF_MCCoordinateRegion_IntPtr:str:").Handle, mkregion, tmp_obj.Handle);
@ -267,7 +273,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
Assert.That (rect == new RectangleF (123.456f+pi, 345.678f-pi, 987.654f*pi, 654.321f/pi), "#testRectangleF_MCCoordinateRegion_IntPtr:str:");
mkmaprect = new MKMapRect (111.1, 222.2, 333.3, 444.4);
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_MKMapRect (obj.Handle, new Selector ("testRectangleF_MKMapRect:").Handle, mkmaprect);
} else {
Messaging.RectangleF_objc_msgSend_stret_MKMapRect (out rect, obj.Handle, new Selector ("testRectangleF_MKMapRect:").Handle, mkmaprect);
@ -276,7 +282,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
#endif // !__TVOS__
rect2 = new RectangleF (9.9f, 8.8f, 7.7f, 6.6f);
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_RectangleF (obj.Handle, new Selector ("testRectangleF_RectangleF:").Handle, rect2);
} else {
Messaging.RectangleF_objc_msgSend_stret_RectangleF (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF:").Handle, rect2);
@ -285,7 +291,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
rect2 = new RectangleF (5.44f, 4.33f, 3.22f, 2.11f);
i = 8;
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_RectangleF_int (obj.Handle, new Selector ("testRectangleF_RectangleF_int:i:").Handle, rect2, 8);
} else {
Messaging.RectangleF_objc_msgSend_stret_RectangleF_int (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_int:i:").Handle, rect2, 8);
@ -293,7 +299,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
AreAlmostEqual (rect, new RectangleF (5.44f*i, 4.33f+i, 3.22f-i, 2.11f/i), "testRectangleF_RectangleF_int:i:");
rect2 = new RectangleF (5.4f, 4.3f, 3.2f, 2.1f);
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_RectangleF_IntPtr (obj.Handle, new Selector ("testRectangleF_RectangleF_IntPtr:str:").Handle, rect2, tmp_obj.Handle);
} else {
Messaging.RectangleF_objc_msgSend_stret_RectangleF_IntPtr (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_IntPtr:str:").Handle, rect2, tmp_obj.Handle);
@ -302,7 +308,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
rect2 = new RectangleF (1, 2, 3, 4);
rect3 = new RectangleF (9, 8, 7, 6);
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_RectangleF_RectangleF_float ( obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_float:b:c:").Handle, rect2, rect3, (float) pi);
} else {
Messaging.RectangleF_objc_msgSend_stret_RectangleF_RectangleF_float (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_float:b:c:").Handle, rect2, rect3, (float) pi);
@ -312,7 +318,7 @@ namespace MonoTouchFixtures.ObjCRuntime {
rect2 = new RectangleF (1, 2, 3, 4);
rect3 = new RectangleF (9, 8, 7, 6);
rect4 = new RectangleF (10, 20, 30, 40);
if (IsArm64 || IsArmv7k) {
if (IsArm64CallingConvention || IsArmv7k) {
rect = Messaging.RectangleF_objc_msgSend_RectangleF_RectangleF_RectangleF (obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_RectangleF:b:c:").Handle, rect2, rect3, rect4);
} else {
Messaging.RectangleF_objc_msgSend_stret_RectangleF_RectangleF_RectangleF (out rect, obj.Handle, new Selector ("testRectangleF_RectangleF_RectangleF_RectangleF:b:c:").Handle, rect2, rect3, rect4);
@ -320,21 +326,21 @@ namespace MonoTouchFixtures.ObjCRuntime {
Assert.That (rect == new RectangleF (20, 30, 40, 50), "#testRectangleF_RectangleF_RectangleF_RectangleF:b:c:");
#if !__WATCHOS__
if (IsArm64) {
if (IsArm64CallingConvention) {
matrix3 = Messaging.Matrix3_objc_msgSend (obj.Handle, new Selector ("testMatrix3").Handle);
} else {
Messaging.Matrix3_objc_msgSend_stret (out matrix3, obj.Handle, new Selector ("testMatrix3").Handle);
}
Assert.That (matrix3.Equals (new Matrix3 (1, 2, 3, 4, 5, 6, 7, 8, 9)), "#testMatrix3");
if (IsArm64) {
if (IsArm64CallingConvention) {
matrix4 = Matrix4_objc_msgSend (obj.Handle, new Selector ("testMatrix4").Handle);
} else {
Matrix4_objc_msgSend_stret (out matrix4, obj.Handle, new Selector ("testMatrix4").Handle);
}
Assert.That (matrix4.Equals (new Matrix4 (9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3)), "#testMatrix4");
if (IsArm64) {
if (IsArm64CallingConvention) {
catransform3d = Messaging.CATransform3D_objc_msgSend (obj.Handle, new Selector ("testCATransform3D").Handle);
} else {
Messaging.CATransform3D_objc_msgSend_stret (out catransform3d, obj.Handle, new Selector ("testCATransform3D").Handle);

Просмотреть файл

@ -84,7 +84,11 @@ namespace MonoTouchFixtures {
Assert.That (t.Obj3, Is.Not.Null, "'t.Obj3' should not be null");
//overflow the nursery, make sure we fill it
#if __WATCHOS__
for (int i = 0; i < 1000 * 100; ++i) // the apple watch doesn't have much memory, so try to not run into OOMs either. The nursery is 512k, so 100k objects should be more than enough to fill it.
#else
for (int i = 0; i < 1000 * 1000 * 10; ++i)
#endif
new OneField ();
Exception ex = null;

Просмотреть файл

@ -27,6 +27,7 @@ namespace MonoTouchFixtures {
Collect ();
bool aot = symbols [1].Contains ("MonoTouchFixtures_Symbols_Collect");
bool llvmonly = symbols [1].Contains ("mono_llvmonly_runtime_invoke"); // LLVM inlines the Collect function, so 'Collect' doesn't show up in the stack trace :/
bool interp = false;
if (!aot) {
@ -38,7 +39,7 @@ namespace MonoTouchFixtures {
}
}
Assert.IsTrue (aot || interp, "#1");
Assert.IsTrue (aot || interp || llvmonly, $"#1\n\t{string.Join ("\n\t", symbols)}");
}
void Collect ()

Просмотреть файл

@ -676,7 +676,7 @@ public class B : A {}
mtouch.CreateTemporaryApp ();
mtouch.Abi = "invalid-arm";
mtouch.AssertExecuteFailure (MTouchAction.BuildSim, "build");
mtouch.AssertError (15, "Invalid ABI: invalid-arm. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64 and arm64+llvm.");
mtouch.AssertError (15, "Invalid ABI: invalid-arm. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64, arm64+llvm, arm64_32 and arm64_32+llvm.");
}
}
@ -2406,7 +2406,7 @@ public class B
mtouch.TargetVer = "10.3";
mtouch.Abi = "armv6";
Assert.AreEqual (1, mtouch.Execute (MTouchAction.BuildDev));
mtouch.AssertError ("MT", 15, "Invalid ABI: armv6. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64 and arm64+llvm.");
mtouch.AssertError ("MT", 15, "Invalid ABI: armv6. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64, arm64+llvm, arm64_32 and arm64_32+llvm.");
mtouch.Abi = "armv7";
Assert.AreEqual (1, mtouch.Execute (MTouchAction.BuildSim));
@ -2449,6 +2449,42 @@ public class B
}
}
[Test]
[TestCase (Target.Dev, null, "ARMv7k")]
[TestCase (Target.Dev, "arm64_32+llvm", "ARM64_32")]
[TestCase (Target.Dev, "armv7k+llvm,arm64_32+llvm", "ARMv7k,ARM64_32")]
[TestCase (Target.Sim, null, "i386")]
public void Architectures_WatchOS (Target target, string abi, string expected_abi)
{
AssertDeviceAvailable ();
using (var mtouch = new MTouchTool ()) {
mtouch.Profile = Profile.watchOS;
mtouch.Abi = abi;
mtouch.CreateTemporaryCacheDirectory ();
mtouch.CreateTemporaryWatchKitExtension ();
mtouch.Action = target == Target.Dev ? MTouchAction.BuildDev : MTouchAction.BuildSim;
mtouch.AssertExecute ("build");
VerifyArchitectures (mtouch.NativeExecutablePath, "arch", expected_abi.Split (','));
}
}
[Test]
public void Architectures_WatchOS_Invalid ()
{
AssertDeviceAvailable ();
using (var mtouch = new MTouchTool ()) {
mtouch.Profile = Profile.watchOS;
mtouch.CreateTemporaryWatchKitExtension ();
mtouch.Abi = "armv7";
mtouch.AssertExecuteFailure (MTouchAction.BuildDev, "device - armv7");
mtouch.AssertError ("MT", 75, "Invalid architecture 'ARMv7' for WatchOS projects. Valid architectures are: ARMv7k, ARMv7k+LLVM, ARM64_32, ARM64_32+LLVM");
mtouch.AssertErrorCount (1);
}
}
[Test]
public void MonoFrameworkArchitectures ()
{

Просмотреть файл

@ -30,6 +30,28 @@
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARMv7k,ARM64_32</MtouchArch>
<CodesignEntitlements>%WATCHAPP_PATH%Entitlements.plist</CodesignEntitlements>
<MtouchFloat32>true</MtouchFloat32>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARMv7k</MtouchArch>
<CodesignEntitlements>%WATCHAPP_PATH%Entitlements.plist</CodesignEntitlements>
<MtouchFloat32>true</MtouchFloat32>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
@ -51,6 +73,22 @@
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARMv7k,ARM64_32</MtouchArch>
<CodesignEntitlements>%WATCHAPP_PATH%Entitlements.plist</CodesignEntitlements>
<MtouchFloat32>true</MtouchFloat32>
<CodesignKey>iPhone Developer</CodesignKey>
<DeviceSpecificBuild>true</DeviceSpecificBuild>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
@ -66,6 +104,22 @@
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32_64|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos-app</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64_32</MtouchArch>
<CodesignEntitlements>%WATCHAPP_PATH%Entitlements.plist</CodesignEntitlements>
<MtouchFloat32>true</MtouchFloat32>
<CodesignKey>iPhone Developer</CodesignKey>
<DeviceSpecificBuild>true</DeviceSpecificBuild>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />

Просмотреть файл

@ -26,7 +26,7 @@
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' Or '$(Configuration)|$(Platform)' == 'Release32|iPhone' Or '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos</OutputPath>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
@ -48,7 +48,7 @@
<MtouchLink>None</MtouchLink>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug32|iPhone' Or '$(Configuration)|$(Platform)' == 'Debug64_32|iPhone' ">
<OutputPath>bin\iPhone\$(Configuration)-watchos</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>

Просмотреть файл

@ -43,6 +43,20 @@
<MtouchArch>i386</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhone\Debug-watchos-extension</OutputPath>
<DefineConstants>DEBUG;;$(DefineConstants)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>0</WarningLevel>
<MtouchDebug>True</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchExtraArgs></MtouchExtraArgs>
<MtouchArch>ARMv7k,ARM64_32</MtouchArch>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|iPhone' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
@ -55,10 +69,36 @@
<MtouchExtraArgs></MtouchExtraArgs>
<MtouchArch>ARMv7k</MtouchArch>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<IpaPackageName>
</IpaPackageName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug64_32|iPhone' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhone\Debug-watchos-extension</OutputPath>
<DefineConstants>DEBUG;;$(DefineConstants)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>0</WarningLevel>
<MtouchDebug>True</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchExtraArgs></MtouchExtraArgs>
<MtouchArch>ARM64_32</MtouchArch>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhone\Release-watchos-extension</OutputPath>
<DefineConstants>MONOTOUCH;;$(DefineConstants)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchExtraArgs>-v -v -v -v --nosymbolstrip</MtouchExtraArgs>
<MtouchArch>ARMv7k,ARM64_32</MtouchArch>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchEnableBitcode>true</MtouchEnableBitcode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release32|iPhone' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhone\Release-watchos-extension</OutputPath>
@ -72,6 +112,20 @@
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchEnableBitcode>true</MtouchEnableBitcode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release64_32|iPhone' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhone\Release-watchos-extension</OutputPath>
<DefineConstants>MONOTOUCH;;$(DefineConstants)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchExtraArgs>-v -v -v -v --nosymbolstrip</MtouchExtraArgs>
<MtouchArch>ARM64_32</MtouchArch>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchEnableBitcode>true</MtouchEnableBitcode>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />

Просмотреть файл

@ -126,7 +126,7 @@ ifdef INCLUDE_TVOS
$(eval $(call Template,tvos,TVOS,arm64 x86_64,x86_64,arm64,AppleTVSimulator,AppleTVOS,-mtvos-simulator-version-min=9.0,-mtvos-version-min=9.0 -fembed-bitcode))
endif
ifdef INCLUDE_WATCH
$(eval $(call Template,watchos,WATCHOS,armv7k x86,i386,armv7k,WatchSimulator,WatchOS,-mwatchos-simulator-version-min=2.0,-mwatchos-version-min=2.0 -fembed-bitcode))
$(eval $(call Template,watchos,WATCHOS,armv7k x86 arm64_32,i386,armv7k arm64_32,WatchSimulator,WatchOS,-mwatchos-simulator-version-min=2.0,-mwatchos-version-min=2.0 -fembed-bitcode))
endif
ifdef INCLUDE_MAC
$(eval $(call Template,macos,MACOS,x86_64,x86_64,,MacOSX,MacOSX,-mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC),-mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC)))

Просмотреть файл

@ -364,7 +364,8 @@ namespace xharness
var monoNativeInfo = new MonoNativeInfo (this, flavor);
var iosTestProject = new iOSTestProject (monoNativeInfo.ProjectPath, generateVariations: false) {
MonoNativeInfo = monoNativeInfo,
Name = monoNativeInfo.ProjectName
Name = monoNativeInfo.ProjectName,
SkipwatchOSARM64_32Variation = monoNativeInfo.ProjectName.Contains ("compat"),
};
IOSTestProjects.Add (iosTestProject);

Просмотреть файл

@ -140,6 +140,8 @@ namespace xharness
case TestPlatform.tvOS:
return new AppRunnerTarget [] { AppRunnerTarget.Simulator_tvOS };
case TestPlatform.watchOS:
case TestPlatform.watchOS_32:
case TestPlatform.watchOS_64_32:
return new AppRunnerTarget [] { AppRunnerTarget.Simulator_watchOS };
case TestPlatform.iOS_Unified:
return new AppRunnerTarget [] { AppRunnerTarget.Simulator_iOS32, AppRunnerTarget.Simulator_iOS64 };
@ -165,6 +167,8 @@ namespace xharness
case TestPlatform.tvOS:
return "tvOS " + Xamarin.SdkVersions.MinTVOSSimulator;
case TestPlatform.watchOS:
case TestPlatform.watchOS_32:
case TestPlatform.watchOS_64_32:
return "watchOS " + Xamarin.SdkVersions.MinWatchOSSimulator;
default:
throw new NotImplementedException (platform.ToString ());
@ -185,7 +189,7 @@ namespace xharness
ignored = new [] { false };
break;
case TestPlatform.watchOS:
platforms = new TestPlatform [] { TestPlatform.watchOS };
platforms = new TestPlatform [] { TestPlatform.watchOS_32 };
ignored = new [] { false };
break;
case TestPlatform.iOS_Unified:
@ -231,7 +235,7 @@ namespace xharness
public string LinkMode;
public string Defines;
public string Undefines;
public bool Ignored;
public bool? Ignored;
public bool EnableSGenConc;
public bool UseThumb;
public MonoNativeFlavor MonoNativeFlavor;
@ -258,17 +262,22 @@ namespace xharness
// 32-bit interpreter doesn't work yet: https://github.com/mono/mono/issues/9871
var supports_interpreter = test.Platform != TestPlatform.iOS_Unified32;
var supports_dynamic_registrar_on_device = test.Platform == TestPlatform.iOS_Unified64 || test.Platform == TestPlatform.tvOS;
// arm64_32 is only supported for Release builds for now.
var supports_debug = test.Platform != TestPlatform.watchOS_64_32;
switch (test.ProjectPlatform) {
case "iPhone":
/* we don't add --assembly-build-target=@all=staticobject because that's the default in all our test projects */
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug)", MTouchExtraArgs = "--assembly-build-target=@all=dynamiclibrary", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic, MonoNativeFlavor = flavor };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor };
if (supports_debug) {
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug)", MTouchExtraArgs = "--assembly-build-target=@all=dynamiclibrary", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic, MonoNativeFlavor = flavor };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor };
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug, profiling)", MTouchExtraArgs = "--assembly-build-target=@all=dynamiclibrary", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic, MonoNativeFlavor = flavor };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug, profiling)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor };
}
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug, profiling)", MTouchExtraArgs = "--assembly-build-target=@all=dynamiclibrary", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic, MonoNativeFlavor = flavor };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug, profiling)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor };
yield return new TestData { Variation = "Release", MTouchExtraArgs = "", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static };
if (test.ProjectConfiguration.Contains ("Debug"))
yield return new TestData { Variation = "Release", MTouchExtraArgs = "", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static };
if (test.Platform == TestPlatform.iOS_Unified32)
yield return new TestData { Variation = "Release: UseThumb", MTouchExtraArgs = "", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, UseThumb = true };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (release)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor };
@ -276,29 +285,37 @@ namespace xharness
switch (test.TestName) {
case "monotouch-test":
yield return new TestData { Variation = "Release (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = false, Profiling = false, Defines = "OPTIMIZEALL" };
yield return new TestData { Variation = "Debug (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = true, Profiling = false, Defines = "OPTIMIZEALL" };
yield return new TestData { Variation = "Debug: SGenConc", MTouchExtraArgs = "", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, EnableSGenConc = true};
if (supports_debug) {
yield return new TestData { Variation = "Debug (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = true, Profiling = false, Defines = "OPTIMIZEALL" };
yield return new TestData { Variation = "Debug: SGenConc", MTouchExtraArgs = "", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, EnableSGenConc = true};
}
if (supports_interpreter) {
// interpreter is broken for monotouch-test: https://github.com/xamarin/maccore/issues/1613, so ignore for now
var ignore_interpreter_because_of_1613 = true;
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613, };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613, };
if (supports_debug) {
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613, };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613, };
}
yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Ignored = ignore_interpreter_because_of_1613, };
}
break;
case "mscorlib":
yield return new TestData { Variation = "Debug: SGenConc", MTouchExtraArgs = "", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, EnableSGenConc = true};
if (supports_interpreter) {
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
if (supports_debug) {
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
}
yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
}
break;
case "mini":
yield return new TestData { Variation = "Debug: SGenConc", MTouchExtraArgs = "", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, EnableSGenConc = true};
if (supports_interpreter) {
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
if (supports_debug) {
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
}
yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
}
break;
@ -347,7 +364,7 @@ namespace xharness
{
foreach (var task in tests) {
if (string.IsNullOrEmpty (task.Variation))
task.Variation = "Debug";
task.Variation = task.ProjectConfiguration.Contains ("Debug") ? "Debug" : "Release";
}
var rv = new List<T> (tests);
@ -443,7 +460,7 @@ namespace xharness
};
T newVariation = creator (build, task, candidates);
newVariation.Variation = variation;
newVariation.Ignored = task.Ignored || ignored;
newVariation.Ignored = ignored ?? task.Ignored;
newVariation.BuildOnly = task.BuildOnly;
rv.Add (newVariation);
}
@ -574,15 +591,27 @@ namespace xharness
if (!project.SkipwatchOSVariation) {
var watchOSProject = project.AsWatchOSProject ();
var buildWatch = new XBuildTask {
var buildWatch32 = new XBuildTask {
Jenkins = this,
ProjectConfiguration = "Debug",
ProjectConfiguration = "Debug32",
ProjectPlatform = "iPhone",
Platform = TestPlatform.watchOS,
Platform = TestPlatform.watchOS_32,
TestName = project.Name,
};
buildWatch.CloneTestProject (watchOSProject);
rv.Add (new RunDeviceTask (buildWatch, Devices.ConnectedWatch.Where (d => d.IsSupported (project))) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly });
buildWatch32.CloneTestProject (watchOSProject);
rv.Add (new RunDeviceTask (buildWatch32, Devices.ConnectedWatch) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly });
if (!project.SkipwatchOSARM64_32Variation) {
var buildWatch64_32 = new XBuildTask {
Jenkins = this,
ProjectConfiguration = "Release64_32", // We don't support Debug for ARM64_32 yet.
ProjectPlatform = "iPhone",
Platform = TestPlatform.watchOS_64_32,
TestName = project.Name,
};
buildWatch64_32.CloneTestProject (watchOSProject);
rv.Add (new RunDeviceTask (buildWatch64_32, Devices.ConnectedWatch32_64.Where (d => d.IsSupported (project))) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly });
}
}
}
@ -1344,6 +1373,8 @@ namespace xharness
case "?all-watchos":
switch (task.Platform) {
case TestPlatform.watchOS:
case TestPlatform.watchOS_32:
case TestPlatform.watchOS_64_32:
is_match = true;
break;
default:
@ -2529,6 +2560,8 @@ namespace xharness
case TestPlatform.iOS_TodayExtension64:
case TestPlatform.tvOS:
case TestPlatform.watchOS:
case TestPlatform.watchOS_32:
case TestPlatform.watchOS_64_32:
process.StartInfo.EnvironmentVariables ["MD_APPLE_SDK_ROOT"] = xcodeRoot;
process.StartInfo.EnvironmentVariables ["MD_MTOUCH_SDK_ROOT"] = Path.Combine (Harness.IOS_DESTDIR, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current");
process.StartInfo.EnvironmentVariables ["TargetFrameworkFallbackSearchPaths"] = Path.Combine (Harness.IOS_DESTDIR, "Library", "Frameworks", "Mono.framework", "External", "xbuild-frameworks");
@ -3444,6 +3477,10 @@ namespace xharness
case TestPlatform.tvOS:
case TestPlatform.watchOS:
return Platform.ToString () + " - " + XIMode;
case TestPlatform.watchOS_32:
return "watchOS 32-bits - " + XIMode;
case TestPlatform.watchOS_64_32:
return "watchOS 64-bits (ARM64_32) - " + XIMode;
case TestPlatform.iOS_Unified32:
return "iOS Unified 32-bits - " + XIMode;
case TestPlatform.iOS_Unified64:
@ -3529,6 +3566,8 @@ namespace xharness
AppRunnerTarget = AppRunnerTarget.Device_tvOS;
break;
case TestPlatform.watchOS:
case TestPlatform.watchOS_32:
case TestPlatform.watchOS_64_32:
AppRunnerTarget = AppRunnerTarget.Device_watchOS;
break;
default:
@ -3545,7 +3584,7 @@ namespace xharness
try {
// Set the device we acquired.
Device = Candidates.First ((d) => d.UDID == device_resource.Resource.Name);
if (Platform == TestPlatform.watchOS)
if (Device.DevicePlatform == DevicePlatform.watchOS)
CompanionDevice = Jenkins.Devices.FindCompanionDevice (Jenkins.DeviceLoadLog, Device);
Jenkins.MainLog.WriteLine ("Acquired device '{0}' for '{1}'", Device.Name, ProjectFile);
@ -4017,6 +4056,8 @@ namespace xharness
iOS_TodayExtension64,
tvOS,
watchOS,
watchOS_32,
watchOS_64_32,
Mac,
Mac_Classic,

Просмотреть файл

@ -120,7 +120,10 @@ namespace xharness
return true;
var conditionValue = condition.Value;
conditionValue = conditionValue.Replace ("$(Configuration)", configuration).Replace ("$(Platform)", platform);
if (configuration != null)
conditionValue = conditionValue.Replace ("$(Configuration)", configuration);
if (platform != null)
conditionValue = conditionValue.Replace ("$(Platform)", platform);
var orsplits = conditionValue.Split (orsplitter, StringSplitOptions.None);
foreach (var orsplit in orsplits) {
@ -353,7 +356,9 @@ namespace xharness
if (!IsNodeApplicable (mea, platform, configuration))
continue;
mea.InnerText += " " + value;
if (mea.InnerText.Length > 0 && mea.InnerText [mea.InnerText.Length - 1] != ' ')
mea.InnerText += " ";
mea.InnerText += value;
found = true;
}
@ -499,12 +504,24 @@ namespace xharness
}
}
public static void FixArchitectures (this XmlDocument csproj, string simulator_arch, string device_arch)
public static void SetArchitecture (this XmlDocument csproj, string platform, string configuration, string architecture)
{
var nodes = csproj.SelectNodes ("/*/*/*[local-name() = 'MtouchArch']");
foreach (XmlNode n in nodes) {
if (!IsNodeApplicable (n, platform, configuration))
continue;
n.InnerText = architecture;
}
}
public static void FixArchitectures (this XmlDocument csproj, string simulator_arch, string device_arch, string platform = null, string configuration = null)
{
var nodes = csproj.SelectNodes ("/*/*/*[local-name() = 'MtouchArch']");
if (nodes.Count == 0)
throw new Exception (string.Format ("Could not find MtouchArch at all"));
foreach (XmlNode n in nodes) {
if (platform != null && configuration != null && !IsNodeApplicable (n, platform, configuration))
continue;
switch (n.InnerText.ToLower ()) {
case "i386":
case "x86_64":
@ -514,11 +531,14 @@ namespace xharness
case "armv7":
case "armv7s":
case "arm64":
case "arm64_32":
case "armv7k":
case "armv7, arm64":
case "armv7k, arm64_32":
n.InnerText = device_arch;
break;
default:
throw new NotImplementedException (string.Format ("Unhandled architecture: {0}", n.Value));
throw new NotImplementedException (string.Format ("Unhandled architecture: {0}", n.InnerText));
}
}
@ -770,13 +790,8 @@ namespace xharness
public static void CloneConfiguration (this XmlDocument csproj, string platform, string configuration, string new_configuration)
{
var projnode = csproj.SelectNodes ("//*[local-name() = 'PropertyGroup']");
var projnode = csproj.GetPropertyGroups (platform, configuration);
foreach (XmlNode xmlnode in projnode) {
if (xmlnode.Attributes ["Condition"] == null)
continue;
if (!IsNodeApplicable (xmlnode, platform, configuration))
continue;
var clone = xmlnode.Clone ();
var condition = clone.Attributes ["Condition"];
condition.InnerText = condition.InnerText.Replace (configuration, new_configuration);
@ -784,23 +799,14 @@ namespace xharness
return;
}
throw new Exception ("Configuration not found.");
throw new Exception ($"Configuration {platform}|{configuration} not found.");
}
public static void DeleteConfiguration (this XmlDocument csproj, string platform, string configuration)
{
var projnode = csproj.SelectNodes ("//*[local-name() = 'PropertyGroup']");
foreach (XmlNode xmlnode in projnode) {
if (xmlnode.Attributes ["Condition"] == null)
continue;
if (!IsNodeApplicable (xmlnode, platform, configuration))
continue;
var projnode = csproj.GetPropertyGroups (platform, configuration);
foreach (XmlNode xmlnode in projnode)
xmlnode.ParentNode.RemoveChild (xmlnode);
return;
}
throw new Exception ($"Configuration not found: {platform}:{configuration}");
}
static IEnumerable<XmlNode> SelectElementNodes (this XmlNode node, string name)

Просмотреть файл

@ -690,7 +690,14 @@ namespace xharness
public IEnumerable<Device> Connected64BitIOS => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.iOS && x.Supports64Bit);
public IEnumerable<Device> Connected32BitIOS => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.iOS && x.Supports32Bit);
public IEnumerable<Device> ConnectedTV => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.tvOS);
public IEnumerable<Device> ConnectedWatch => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.watchOS);
public IEnumerable<Device> ConnectedWatch => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.watchOS && x.Architecture == Architecture.ARMv7k);
public IEnumerable<Device> ConnectedWatch32_64 {
get {
return connected_devices.Where ((x) => {
return x.DevicePlatform == DevicePlatform.watchOS && x.Architecture == Architecture.ARM64_32;
});
}
}
Task ILoadAsync.LoadAsync (Log log, bool include_locked, bool force)
{

Просмотреть файл

@ -150,6 +150,7 @@ namespace xharness
{
public bool SkipiOSVariation;
public bool SkipwatchOSVariation;
public bool SkipwatchOSARM64_32Variation;
public bool SkiptvOSVariation;
public bool BuildOnly;

Просмотреть файл

@ -21,6 +21,14 @@ namespace xharness
public string WatchOSExtensionProjectPath { get; private set; }
public string WatchOSProjectPath { get { return ProjectPath; } private set { ProjectPath = value; } }
public override string SimulatorArchitectures {
get { return "i386"; }
}
public override string DeviceArchitectures {
get { return "ARMv7k, ARM64_32"; }
}
void CreateWatchOSAppProject ()
{
var csproj = new XmlDocument ();
@ -81,6 +89,28 @@ namespace xharness
{
var csproj = inputProject;
var suffix = Suffix + "-extension";
// Remove unused configurations
csproj.DeleteConfiguration ("iPhone", "Release-bitcode");
csproj.DeleteConfiguration ("iPhone", "Release64");
csproj.DeleteConfiguration ("iPhone", "Debug64");
csproj.FixArchitectures ("i386", "ARMv7k", "iPhone", "Release32");
csproj.FixArchitectures ("i386", "ARMv7k", "iPhone", "Debug32");
// add Release64_32 and set the correct architecture
csproj.CloneConfiguration ("iPhone", "Release", "Release64_32");
csproj.FixArchitectures ("i386", "ARM64_32", "iPhone", "Release64_32");
// add Debug64_32 and set the correct architecture
csproj.CloneConfiguration ("iPhone", "Debug", "Debug64_32");
csproj.FixArchitectures ("i386", "ARM64_32", "iPhone", "Debug64_32");
csproj.FixArchitectures (SimulatorArchitectures, DeviceArchitectures, "iPhoneSimulator", "Debug");
csproj.FixArchitectures (SimulatorArchitectures, DeviceArchitectures, "iPhoneSimulator", "Release");
csproj.FixArchitectures (SimulatorArchitectures, DeviceArchitectures, "iPhone", "Debug");
csproj.FixArchitectures (SimulatorArchitectures, DeviceArchitectures, "iPhone", "Release");
csproj.SetProjectTypeGuids ("{1E2E965C-F6D2-49ED-B86E-418A60C69EEF};" + LanguageGuid);
csproj.SetOutputPath ("bin\\$(Platform)\\$(Configuration)" + suffix);
csproj.SetIntermediateOutputPath ("obj\\$(Platform)\\$(Configuration)" + suffix);
@ -88,7 +118,7 @@ namespace xharness
csproj.SetPlatformAssembly ("Xamarin.WatchOS");
csproj.SetImport (IsFSharp ? "$(MSBuildExtensionsPath)\\Xamarin\\WatchOS\\Xamarin.WatchOS.AppExtension.FSharp.targets" : "$(MSBuildExtensionsPath)\\Xamarin\\WatchOS\\Xamarin.WatchOS.AppExtension.CSharp.targets");
csproj.FixProjectReferences ("-watchos");
csproj.FixArchitectures ("i386", "ARMv7k");
csproj.FixInfoPListInclude (suffix);
csproj.SetOutputType ("Library");
csproj.AddAdditionalDefines ("BITCODE", "iPhone", "Release");
@ -108,7 +138,7 @@ namespace xharness
// Not linking a watch extensions requires passing -Os to the native compiler.
// https://github.com/mono/mono/issues/9867
var configurations = new string [] { "Debug", "Debug32", "Release", "Release32", "Release-bitcode" };
var configurations = new string [] { "Debug", "Debug32", "Debug64_32", "Release", "Release32", "Release64_32" };
foreach (var c in configurations) {
var flags = "-fembed-bitcode-marker";
if (csproj.GetMtouchLink ("iPhone", c) == "None")

Просмотреть файл

@ -706,6 +706,8 @@ namespace Xamarin.Bundler {
if (IsDeviceBuild) {
validAbis.Add (Abi.ARMv7k);
validAbis.Add (Abi.ARMv7k | Abi.LLVM);
validAbis.Add (Abi.ARM64_32);
validAbis.Add (Abi.ARM64_32 | Abi.LLVM);
} else {
validAbis.Add (Abi.i386);
}
@ -777,6 +779,12 @@ namespace Xamarin.Bundler {
case "arm64+llvm":
value = Abi.ARM64 | Abi.LLVM;
break;
case "arm64_32":
value = Abi.ARM64_32;
break;
case "arm64_32+llvm":
value = Abi.ARM64_32 | Abi.LLVM;
break;
case "armv7k":
value = Abi.ARMv7k;
break;
@ -784,7 +792,7 @@ namespace Xamarin.Bundler {
value = Abi.ARMv7k | Abi.LLVM;
break;
default:
throw new MonoTouchException (15, true, "Invalid ABI: {0}. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64 and arm64+llvm.", str);
throw new MonoTouchException (15, true, "Invalid ABI: {0}. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, armv7k, armv7k+llvm, arm64, arm64+llvm, arm64_32 and arm64_32+llvm.", str);
}
// merge this value with any existing ARMv? already specified.

Просмотреть файл

@ -106,7 +106,11 @@ namespace Xamarin.Bundler
MonoNativeMode = App.DeploymentTarget.Major >= 10 ? MonoNativeMode.Unified : MonoNativeMode.Compat;
break;
case ApplePlatform.WatchOS:
MonoNativeMode = App.DeploymentTarget.Major >= 3 ? MonoNativeMode.Unified : MonoNativeMode.Compat;
if (Application.IsArchEnabled (Abis, Abi.ARM64_32)) {
MonoNativeMode = MonoNativeMode.Unified;
} else {
MonoNativeMode = App.DeploymentTarget.Major >= 3 ? MonoNativeMode.Unified : MonoNativeMode.Compat;
}
break;
default:
throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in Xamarin.iOS; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", App.Platform);

Просмотреть файл

@ -1067,7 +1067,7 @@ namespace Xamarin.Bundler
},
true // do not show the option anymore
},
{ "abi=", "Comma-separated list of ABIs to target. Currently supported: armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, arm64, arm64+llvm, i386, x86_64", v => app.ParseAbi (v) },
{ "abi=", "Comma-separated list of ABIs to target. Currently supported: armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, arm64, arm64+llvm, arm64_32, arm64_32+llvm, i386, x86_64", v => app.ParseAbi (v) },
{ "override-abi=", "Override any previous abi. Only used for testing.", v => { app.ClearAbi (); app.ParseAbi (v); }, true }, // Temporary command line arg until XS has better support for 64bit architectures.
{ "cxx", "Enable C++ support", v => { app.EnableCxx = true; }},
{ "enable-repl:", "Enable REPL support. For simulator only and disabling linking is recommended.", v => { app.EnableRepl = ParseBool (v, "enable-repl"); } },