The past few packages on http://releases.llvm.org/download.html for mac have required the latest version of mac os. Previously they were built for 10.5 (I believe).
I was just wondering if there is a technical reason for this change in requirements and if not, if it could be revered. I have systems I actively use which are 10.10 and 10.11 and it would be awesome if I didn’t have to build new releases, as it takes quite a while on my older hardware.
P.S. If anyone needs to build a release for themselves, I believe the process is:
clone LLVM from github - https://github.com/llvm-mirror/llvm
get target OS darwin version from here: https://en.wikipedia.org/wiki/Darwin_(operating_system) - in the example below I’m building for 14.5.0
llvm/utils/release/test-release.sh -release 6.0.0 -final -triple x86_64-apple-darwin14.5.0
results in: llvm/utils/release/final/clang+llvm-6.0.0-x86_64-apple-darwin14.5.0.tar.xz
Thanks for the heads-up. I’ve started targeting a minimum macOS deployment target of 10.9 for the release binaries.
Hope this helps. Let me know if there are any issues.
I described this off-list to Zac, but for anyone else who is following, simply specifying the target triple is not enough to have the build system set an older macOS deployment target. I.e the 6.0.0-rc1 binaries I've just uploaded have the same deployment target problem.
Looking at the 5.0.0 and 6.0.0-rc1 binaries, I can confirm that their deployment target was too new:
Load command 9
I'm not sure why this is happening, because the build logs are peppered with instances of -mmacosx-version-min=10.9.
At any rate, it looks like we currently lack support for inferring an older deployment target based on the triple passed to test-release.sh. It would be great to have a patch for this. For now, I'll try manually specifying extra cflags when I run the script.
How is -mmacosx-version-min=10.9 being set? LLVM_COMPILE_FLAGS? Or CMAKE_CXX_COMPILE?
Great question, I'm a bit flummoxed by this.
It might have something to do with CMAKE_OSX_DEPLOYMENT_TARGET. From the docs:
Specify the minimum version of OS X on which the target binaries are to be deployed. CMake uses this value for the -mmacosx-version-min flag and to help choose the default SDK (see CMAKE_OSX_SYSROOT).
If not set explicitly the value is initialized by the MACOSX_DEPLOYMENT_TARGET environment variable, if set, and otherwise computed based on the host platform.
I suppose this variable is automatically inferred by CMake and then inserted into its set of compile flags. LLVM's cmake files don't appear to touch it. I'll try setting the environment variable and see if that works.