Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] Use LLVM-based toolchain (#6683)
Browse files Browse the repository at this point in the history
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
grendello authored Mar 17, 2022
1 parent dccda98 commit b21cbf9
Show file tree
Hide file tree
Showing 19 changed files with 412 additions and 236 deletions.
2 changes: 1 addition & 1 deletion Documentation/guides/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ the Android [binutils][binutils] such as `ld`, the native linker,
and `as`, the native assembler. These tools are included in the
Xamarin.Android installation.

The default value is `$(MonoAndroidBinDirectory)\binutils\`.
The default value is `$(MonoAndroidBinDirectory)\binutils\bin\`.

Added in Xamarin.Android 10.0.

Expand Down
10 changes: 2 additions & 8 deletions build-tools/create-packs/SignList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,12 @@
<ThirdParty Include="protobuf-net.dll" />
<ThirdParty Include="SgmlReaderDll.dll" />
<ThirdParty Include="aapt2.exe" />
<ThirdParty Include="aarch64-linux-android-as.exe" />
<ThirdParty Include="llvm-mc.exe" />
<ThirdParty Include="llvm-strip.exe" />
<ThirdParty Include="aarch64-linux-android-ld.exe" />
<ThirdParty Include="aarch64-linux-android-strip.exe" />
<ThirdParty Include="arm-linux-androideabi-as.exe" />
<ThirdParty Include="arm-linux-androideabi-ld.exe" />
<ThirdParty Include="arm-linux-androideabi-strip.exe" />
<ThirdParty Include="i686-linux-android-as.exe" />
<ThirdParty Include="i686-linux-android-ld.exe" />
<ThirdParty Include="i686-linux-android-strip.exe" />
<ThirdParty Include="x86_64-linux-android-as.exe" />
<ThirdParty Include="x86_64-linux-android-ld.exe" />
<ThirdParty Include="x86_64-linux-android-strip.exe" />
</ItemGroup>

<ItemGroup>
Expand Down
41 changes: 17 additions & 24 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -322,18 +322,22 @@
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\lib64\libZipSharpNative.pdb" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\proguard\bin\proguard.bat" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\aapt2.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\aarch64-linux-android-as.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\aarch64-linux-android-ld.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\aarch64-linux-android-strip.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\arm-linux-androideabi-as.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\arm-linux-androideabi-ld.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\arm-linux-androideabi-strip.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\i686-linux-android-as.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\i686-linux-android-ld.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\i686-linux-android-strip.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\x86_64-linux-android-as.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\x86_64-linux-android-ld.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\x86_64-linux-android-strip.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\as.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\ld.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\llvm-mc.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\llvm-strip.exe" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\aarch64-linux-android-as.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\aarch64-linux-android-ld.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\aarch64-linux-android-strip.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\arm-linux-androideabi-as.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\arm-linux-androideabi-ld.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\arm-linux-androideabi-strip.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\i686-linux-android-as.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\i686-linux-android-ld.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\i686-linux-android-strip.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\x86_64-linux-android-as.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\x86_64-linux-android-ld.cmd" />
<_MSBuildFilesWin Include="$(MSBuildSrcDir)\binutils\bin\x86_64-linux-android-strip.cmd" />
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libmono-android.debug.dll" Condition=" '$(HostOS)' != 'Windows' " />
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libmono-android.release.dll" Condition=" '$(HostOS)' != 'Windows' " />
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libMonoPosixHelper.dll" />
Expand All @@ -352,19 +356,8 @@
<Permission>755</Permission>
</_MSBuildFilesUnixSignAndHarden>
</ItemDefinitionGroup>
<Import Project="unix-binutils.projitems" />
<ItemGroup>
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\aarch64-linux-android-as" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\aarch64-linux-android-ld" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\aarch64-linux-android-strip" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\arm-linux-androideabi-as" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\arm-linux-androideabi-ld" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\arm-linux-androideabi-strip" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\i686-linux-android-as" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\i686-linux-android-ld" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\i686-linux-android-strip" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\x86_64-linux-android-as" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\x86_64-linux-android-ld" />
<_MSBuildFilesUnixSignAndHarden Include="$(MSBuildSrcDir)\$(HostOS)\binutils\x86_64-linux-android-strip" />
<_MSBuildFilesUnix Include="$(MSBuildSrcDir)\$(HostOS)\illinkanalyzer" Permission="755" />
<_MSBuildFilesUnix Include="$(MSBuildSrcDir)\$(HostOS)\jit-times" Permission="755" />
<_MSBuildFilesUnix Include="$(MSBuildSrcDir)\$(HostOS)\aprofutil" ExcludeFromAndroidNETSdk="true" />
Expand Down
102 changes: 102 additions & 0 deletions build-tools/installers/unix-binutils.projitems
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>
4 changes: 3 additions & 1 deletion build-tools/xaprepare/xaprepare/Application/NDKTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ class NDKTool
{
public string Name { get; }
public string DestinationName { get; } = String.Empty;
public bool Prefixed { get; }

public NDKTool (string name, string? destinationName = null)
public NDKTool (string name, string? destinationName = null, bool prefixed = false)
{
if (name.Trim ().Length == 0) {
throw new ArgumentException (nameof (name), "must not be empty");
}
Prefixed = prefixed;
Name = name;
if (String.IsNullOrWhiteSpace (destinationName)) {
return;
Expand Down
13 changes: 10 additions & 3 deletions build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Xamarin.Android.Prepare
//
partial class Configurables
{
const string BinutilsVersion = "2.35.2-XA.1";
const string BinutilsVersion = "L_13.0.1-4.0.1";

const string MicrosoftOpenJDK11Version = "11.0.10";
const string MicrosoftOpenJDK11Release = "9.1";
Expand Down Expand Up @@ -53,7 +53,7 @@ public static partial class Urls

public static Uri MonoArchive_BaseUri = new Uri ("https://xamjenkinsartifact.azureedge.net/mono-sdks/");

public static Uri BinutilsArchive = new Uri ($"https://github.com/xamarin/xamarin-android-binutils/releases/download/{BinutilsVersion}/xamarin-android-binutils-{BinutilsVersion}.7z");
public static Uri BinutilsArchive = new Uri ($"https://github.com/xamarin/xamarin-android-binutils/releases/download/{BinutilsVersion}/xamarin-android-toolchain-{BinutilsVersion}.7z");
}

public static partial class Defaults
Expand Down Expand Up @@ -219,9 +219,16 @@ public static partial class Defaults
};

public static readonly List <NDKTool> NDKTools = new List<NDKTool> {
// Tools prefixed with architecture triple
new NDKTool (name: "as", prefixed: true),
new NDKTool (name: "ld", prefixed: true),
new NDKTool (name: "strip", prefixed: true),

// Unprefixed tools
new NDKTool (name: "as"),
new NDKTool (name: "ld"),
new NDKTool (name: "strip"),
new NDKTool (name: "llvm-mc"),
new NDKTool (name: "llvm-strip"),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace Xamarin.Android.Prepare
{
partial class Step_InstallGNUBinutils
{
const string? ExecutableExtension = null;
const string[]? ExecutableExtensions = null;
}
}
Loading

0 comments on commit b21cbf9

Please sign in to comment.