From 6f3e83277940f1ba379efb8f41b4fdad200df002 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 6 Aug 2019 09:30:16 -0700 Subject: [PATCH 1/2] Set MACOSX_DEPLOYMENT_TARGET for macOS releases This is an effort to ideally produce "more portable" binaries for the releases we publish to GitHub. Currently the way macOS works is that you're generally only guaranteed to work on the same platform you built on and later (although it may sometimes work on older platforms). By configuring this environment variable it should be possible to lower the binary compatibility requirement, allowing running binaries on older OS releases than the build machine is running. I've chosen 10.9 here since it seems to be the lowest that "just works", but there's no particular reason other than that for choosing this. Rust itself chooses 10.8 (I think) for the compiler and 10.7 for the standard library. This decision is largely driven by the C++ code from wabt-sys which has more requirements about binary compatibility than Rust code does. Note that I don't actually have older macOS machines to test on as well, but I can at least confirm that this does affect the build process! --- .azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 7e4145b1457f..636186015c3a 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -99,6 +99,7 @@ jobs: imageName: 'ubuntu-16.04' mac: imageName: 'macos-10.14' + MACOSX_DEPLOYMENT_TARGET: 10.9 variables: toolchain: stable From 918916b7a88a8a846b156d19d20374707e5458be Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 6 Aug 2019 09:35:50 -0700 Subject: [PATCH 2/2] Comment the env var added --- .azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 636186015c3a..ecfb718e9906 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -99,6 +99,10 @@ jobs: imageName: 'ubuntu-16.04' mac: imageName: 'macos-10.14' + # Lower the deployment target from our build image in an attempt to + # build more portable binaries that run on older releases. Note that + # 10.9 here is arbitrarily chosen and just happens to be the lowest that + # works at this time. Raising this is probably fine. MACOSX_DEPLOYMENT_TARGET: 10.9 variables: