Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add commit SHA1 to `$(AndroidMxeInstallPrefix)`, so that we can revert mxe to an earlier version. Most of the current "do not rebuild DEPENDENCY" logic is "forward-only": it only works properly if you go *forward* in time, not backwards in time. For example, consider the `ForceBuild` target in `build-tools/mono-runtimes/mono-runtimes.targets`: if the HEAD commit within `external/mono` moves "backward" so that the resulting timestamp of `autogen.sh` is *older* than e.g. `bin\$(Configuration)\bcl-tests\bcl-tests.zip`, re-running the `ForceBuild` target won't do anything. `external/mono` and `mono-runtimes` are forward-only. Usually this is considered acceptable. If it's truly a problem, nuke the `bin` directory and rebuild. "Forward-only" behavior is *not* always acceptable. Case in point: `external/mxe`. Building MXE takes a significant amount of time -- roughly 10+ minutes -- so we *cache* the MXE toolchain into `$(AndroidMxeInstallPrefix)` -- which defaulted to `$HOME/android-toolchain/mxe` -- and only rebuild the cached MXE when `external/mxe` changes. All well and good...except when MXE *cannot* be built *at all*. Case in point: [MXE couldn't be built with Xcode 8.3][mxe1744]. We didn't notice this for a long period of time, because our Jenkins machines are fairly stable; they built and cached MXE under Xcode 8.1, and never had to rebuild MXE again. [mxe1744]: mxe/mxe#1744 The only reason we noticed is because some developers tried to build MXE on new machines, with newer Xcode versions, and MXE didn't build. This raises an interesting conundrum: for *cached* resources such as MXE, it is *extremely* important to be able to *revert* to a "known good" version. "Forward only" behavior is at odds with this; you *can't* revert to a "known good" version, because it may have been replaced! Bump to mxe/xamarin/a926b16d, as this version *can* be built under Xcode 9. (If we're lucky, it will *also* be able to build an updated commit of `external/libzip`…) Additionally, alter the semantics of `$(AndroidMxeInstallPrefix)` to *require* that it *ends with* the abbreviated commit hash of the `external/mxe` commit; in this commit, `$(AndroidMxeInstallPrefix)` is `$HOME/android-toolchain/mxe-a926b16d`. In particular, this allows us to *revert*: bumping `external/mxe` will build MXE into a new, *unique*, directory, which means that any previously built directory will not be modified. This in turn allows us to "revert" the patch to use the previous MXE, if necessary. The updated MXE now includes a few more "native" plugins in `plugins/native/$(OS_SHORT_NAME)`. This caused issues on macOS where the `patch` that MXE built ran into a problem because it relied on newer APIs not available in older versions of macOS. Fix this by disabling building the native plugins and instead rely on the system ones by overriding `$(OS_SHORT_NAME)`. [This mirrors what MXE is doing on Travis][travis]. [travis]: https://github.com/mxe/mxe/blob/16acc77a3d45425d5a7e11d8b2511fc5a28dd56f/.travis.yml#L6
- Loading branch information