-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Use LLVM-based toolchain (#6683)
Context: fd5f31c Context: #6685 Context: https://github.com/xamarin/xamarin-android-binutils Context: dotnet/android-native-tools@6d4e3bb Context: #6840 Changes: dotnet/android-native-tools@2.35.2-XA.1...L_13.0.1-4.0.1 So far, Xamarin.Android has been using a GNU Binutils toolchain to compile and link native assembler code we generate during application build. Unfortunately, Binutils have a problem with certain filename encodings on Windows -- which required that we downgrade to Binutils 2.35.2 in commit fd5f31c -- so we decided to switch to an LLVM-based toolchain which handles such file names without issues. However, as mono/mono & dotnet/runtime AOT expects a GNU Binutils-compatible toolchain, it was necessary to implement a GNU Assembler (`gas`) wrapper around the LLVM `llvm-mc` assembler, so that command lines used by the Mono AOT compiler keep working fine. Since LLVM utilities are multi-target by default and, unlike GNU Binutils, LLVM doesn't need separate builds of every utility, we now provide GNU Binutils architecture-prefixed wrapper scripts which invoke their LLVM counterparts with appropriate parameters. The following LLVM utilities are included: - `llvm-mc` (assembler) - `lld` (linker) - `llvm-strip` Migrating to LLVM from GNU Binutils increases our install size: * macOS `.pkg` size increases by ~29MB, installation size increases by ~75MB. * Windows `.vsix` size increases by ~14MB, installation size increases by ~40MB. Aside: We've updated our unit tests to set `$(_DisableParallelAot)`=True, because when AOT is done in parallel, it's very difficult to make sense of the AOT compiler messages, as messages from multiple processes are all intermixed. We're disabling parallel AOT to preserve our sanity when things break. TODO: the Resulting `.apk` sizes also increase unexpectedly, with `Xamarin.Forms_Performance_Integration-Signed-Release-Profiled-Aot.apkdesc` showing a 1.7MB increase in `.apk` size. We believe that this is because of more verbose debug symbols. #6840 will track this.
- Loading branch information
Showing
19 changed files
with
412 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<_LlvmLibExtension Condition=" '$(HostOS)' == 'Linux' ">so.13</_LlvmLibExtension> | ||
<_LlvmLibExtension Condition=" '$(HostOS)' == 'Darwin' ">dylib</_LlvmLibExtension> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\aarch64-linux-android-as" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\aarch64-linux-android-ld" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\aarch64-linux-android-strip" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\arm-linux-androideabi-as" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\arm-linux-androideabi-ld" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\arm-linux-androideabi-strip" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\as" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\i686-linux-android-as" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\i686-linux-android-ld" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\i686-linux-android-strip" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\ld" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\llvm-mc" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\llvm-strip" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\x86_64-linux-android-as" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\x86_64-linux-android-ld" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\bin\x86_64-linux-android-strip" /> | ||
|
||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldCOFF.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldCommon.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldCore.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldDriver.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldELF.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldMachO.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldMachO2.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldMinGW.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldReaderWriter.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldWasm.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\liblldYAML.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAArch64AsmParser.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAArch64CodeGen.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAArch64Desc.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAArch64Disassembler.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAArch64Info.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAArch64Utils.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAggressiveInstCombine.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAnalysis.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMARMAsmParser.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMARMCodeGen.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMARMDesc.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMARMDisassembler.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMARMInfo.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMARMUtils.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAsmParser.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMAsmPrinter.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMBinaryFormat.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMBitReader.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMBitstreamReader.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMBitWriter.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMCFGuard.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMCodeGen.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMCore.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMCoroutines.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMDebugInfoCodeView.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMDebugInfoDWARF.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMDebugInfoMSF.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMDebugInfoPDB.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMDemangle.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMExtensions.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMFrontendOpenMP.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMGlobalISel.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMInstCombine.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMInstrumentation.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMipo.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMIRReader.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMLibDriver.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMLinker.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMLTO.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMMC.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMMCDisassembler.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMMCParser.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMMIRParser.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMObjCARCOpts.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMObject.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMOption.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMPasses.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMProfileData.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMRemarks.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMScalarOpts.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMSelectionDAG.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMSupport.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMTableGen.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMTableGenGlobalISel.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMTarget.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMTextAPI.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMTransformUtils.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMVectorize.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMWindowsManifest.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMX86AsmParser.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMX86CodeGen.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMX86Desc.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMX86Disassembler.$(_LlvmLibExtension)" /> | ||
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\lib\libLLVMX86Info.$(_LlvmLibExtension)" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.