Feature/build on older macos#50
Merged
Merged
Conversation
[why] Building on Apple often involves setting the target MacOS version Independent of compiler etc. This is done with clang's `-mmacosx-version-min` command line flag. Typically this is set to 10.9, as Apple switch from libstdc++ to libc++ with 10.9. With MacOS prior to 10.13 we need to enable the aligned allocation, with the switch `-faligned-allocation`: "Enable C++17 aligned allocation functions" With MacOS 10.13 and later the `-faligned-allocation` became standard, but it does not hurt to insist on it as some projects might have turned it off via `-fno-aligned-allocation`. This commit is driven by the need to build GUL via conda-build which targets all MacOS 10.9+. 10.9 (Mavericks, 2013) Minimum version we want to support 10.13 (High Sierra, 2017) Minimum version that has C++17 allocators [how] As we rely on these now, enable them if we can. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
d9e104c to
4986d95
Compare
Member
Author
|
Extend the explanation in the commit message, force push. |
Contributor
But the second commit has no proper description. I have a similar patch laying around...you may wanna take that... 😉
|
soerengrunewald
approved these changes
Jun 3, 2026
[Why] It has become quite verbose to first check and then eventually add the compiler option. Luckily for us, meson has a shortcut for this scenario, where we give it a list of candidates and receive a list of all supported options, which we can use directly. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
4986d95 to
f3bf0d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See
meson: Allow SmallVector to compile on all Macs
[why]
Building on Apple often involves setting the target MacOS version
Independent of compiler etc. This is done with clang's
-mmacosx-version-mincommand line flag.
Typically this is set to 10.9, as Apple switch from libstdc++ to libc++
with 10.9.
With MacOS prior to 10.13 we need to enable the aligned allocation, with the
switch
-faligned-allocation:"Enable C++17 aligned allocation functions"
With MacOS 10.13 and later the
-faligned-allocationbecame standard,but it does not hurt to insist on it as some projects might have turned
it off via
-fno-aligned-allocation.This commit is driven by the need to build GUL via conda-build which
targets all MacOS 10.9+.
10.9 (Mavericks, 2013) Minimum version we want to support
10.13 (High Sierra, 2017) Minimum version that has C++17 allocators
[how]
As we rely on these now, enable them if we can.