diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets index 8e1bd8ec945e1f..4524a8bd246f80 100644 --- a/eng/testing/tests.targets +++ b/eng/testing/tests.targets @@ -174,6 +174,8 @@ GenerateXcodeProject="True" BuildAppBundle="True" Optimized="True" + UseLlvm="$(MonoEnableLLVM)" + LlvmPath="$(RuntimePackDir)\native\cross" DevTeamProvisioning="$(DevTeamProvisioning)" OutputDirectory="$(BundleDir)" AppDir="$(BundleDir)"> diff --git a/src/mono/msbuild/AppleAppBuilder/AotCompiler.cs b/src/mono/msbuild/AppleAppBuilder/AotCompiler.cs index 6f9eef6671b7c7..5a5b8f9ae8b555 100644 --- a/src/mono/msbuild/AppleAppBuilder/AotCompiler.cs +++ b/src/mono/msbuild/AppleAppBuilder/AotCompiler.cs @@ -63,8 +63,7 @@ private static void PrecompileLibrary( // TODO: enable direct-pinvokes (to get rid of -force_loads) //.Append("direct-pinvoke,") .Append("full,") - .Append("mattr=+crc,") // enable System.Runtime.Intrinsics.Arm - .Append("mattr=+base,"); // (Crc32 and ArmBase for now) + .Append("mattr=+crc,"); // enable System.Runtime.Intrinsics.Arm (Crc32 and ArmBase for now) if (useLlvm) { diff --git a/src/mono/msbuild/AppleAppBuilder/AppleAppBuilder.cs b/src/mono/msbuild/AppleAppBuilder/AppleAppBuilder.cs index 4c55399fe1f4ab..bdf5362a888187 100644 --- a/src/mono/msbuild/AppleAppBuilder/AppleAppBuilder.cs +++ b/src/mono/msbuild/AppleAppBuilder/AppleAppBuilder.cs @@ -139,7 +139,7 @@ public override bool Execute() throw new ArgumentException($"ProjectName='{ProjectName}' should not contain spaces"); } - if (UseLlvm && !string.IsNullOrEmpty(LlvmPath)) + if (UseLlvm && string.IsNullOrEmpty(LlvmPath)) { // otherwise we might accidentally use some random llc/opt from PATH (installed with clang) throw new ArgumentException($"LlvmPath shoun't be empty when UseLlvm is set"); diff --git a/src/mono/netcore/sample/iOS/Makefile b/src/mono/netcore/sample/iOS/Makefile index 58f935eb161e44..31a7e9340f5f62 100644 --- a/src/mono/netcore/sample/iOS/Makefile +++ b/src/mono/netcore/sample/iOS/Makefile @@ -1,6 +1,7 @@ MONO_CONFIG=Debug MONO_ARCH=arm64 DOTNET := ../../../../.././dotnet.sh +USE_LLVM=True # usage example: # 'make all MONO_ARCH=x64 MONO_CONFIG=Release' to build the app for simulator @@ -11,7 +12,7 @@ program: bundle: clean program $(DOTNET) msbuild /t:BuildAppBundle /p:Configuration=$(MONO_CONFIG) /p:TargetArchitecture=$(MONO_ARCH) \ - /p:UseLlvm=$(UseLlvm) /p:LlvmPath=$(LlvmPath) + /p:UseLlvm=$(USE_LLVM) deploy-sim: $(DOTNET) msbuild /t:IosDeployToSimulator /p:Configuration=$(MONO_CONFIG) /p:TargetArchitecture=$(MONO_ARCH) diff --git a/src/mono/netcore/sample/iOS/Program.csproj b/src/mono/netcore/sample/iOS/Program.csproj index 7a31c46ca903bf..908aad01ea612b 100644 --- a/src/mono/netcore/sample/iOS/Program.csproj +++ b/src/mono/netcore/sample/iOS/Program.csproj @@ -45,7 +45,7 @@ DevTeamProvisioning="$(DevTeamProvisioning)" OutputDirectory="$(BundleDir)" UseLlvm="$(UseLlvm)" - LlvmPath="$(LlvmPath)" + LlvmPath="$(RuntimePackDir)\native\cross" Optimized="False" AppDir="$(BundleDir)">