From 69c851f28a4cdbf172eb9cdc1769d1b90b821107 Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Fri, 15 Jul 2016 17:21:34 -0400 Subject: [PATCH] [android-toolchain] Fix the `_CreateMxeW32Toolchain` Condition. The `_CreateMxeW32Toolchain` target condition checked for `:mxe-Win64:`, not `:mxe-Win32:`, which caused it to needlessly run whenever `:mxe-Win64:` was set (spending extra time), while *not* running when it was requested, i.e. when `:mxe-Win32:` was set. Additionally, I previously had an MXE SNAFU wherein `android-toolchain.targets` was updated to build `zlib`, but my local build output *didn't contain `zlib` outputs*. This resulted in obscure build errors and needless tearing out of limited hair, which could have been avoided if the `zlib` outputs had been listed as outputs that could be checked for. Thus, rework the existing `_CreateMxeW32Toolchain` and `_CreateMxeW64Toolchain` dichotomy, and instead introduce a new `@(_AndroidMxeToolchain)` item group with conditional values based on `$(AndroidSupportedHostJitAbisForConditionalChecks)`. This allows for a more "extensible" output file format that doesn't needlessly copy obscure identifiers like `i686-w64-mingw32.static` for output files. `_CreateMxeW32Toolchain` and `_CreateMxeW64Toolchain` are dead; long live `_CreateMxeToolchains`! --- .../android-toolchain.targets | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/build-tools/android-toolchain/android-toolchain.targets b/build-tools/android-toolchain/android-toolchain.targets index b9a0e061e90..b927b9fa676 100644 --- a/build-tools/android-toolchain/android-toolchain.targets +++ b/build-tools/android-toolchain/android-toolchain.targets @@ -92,27 +92,30 @@ WorkingDirectory="..\..\external\mxe" /> - + <_AndroidMxeToolchain Include="i686-w64-mingw32.static" Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win32:'))" /> + <_AndroidMxeToolchain Include="x86_64-w64-mingw32.static" Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win64:'))" /> + + + <_AndroidMxeOutput Include="@(_AndroidMxeToolchain->'$(AndroidMxeFullPath)\bin\%(Identity)-gcc')" /> + <_AndroidMxeOutput Include="@(_AndroidMxeToolchain->'$(AndroidMxeFullPath)\bin\%(Identity)-cmake')" /> + <_AndroidMxeOutput Include="@(_AndroidMxeToolchain->'$(AndroidMxeFullPath)\%(Identity)\lib\libz.a')" /> + <_AndroidMxeOutput Include="@(_AndroidMxeToolchain->'$(AndroidMxeFullPath)\%(Identity)\include\zlib.h')" /> + + + Outputs="@(_AndroidMxeOutput)"> - - - -