Skip to content

Feature/build on older macos#50

Merged
Finii merged 2 commits into
mainfrom
feature/build-on-older-macos
Jun 3, 2026
Merged

Feature/build on older macos#50
Finii merged 2 commits into
mainfrom
feature/build-on-older-macos

Conversation

@Finii

@Finii Finii commented Jun 2, 2026

Copy link
Copy Markdown
Member

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-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.

@Finii

Finii commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

[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>
@Finii Finii force-pushed the feature/build-on-older-macos branch from d9e104c to 4986d95 Compare June 2, 2026 11:01
@Finii

Finii commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

Extend the explanation in the commit message, force push.

@soerengrunewald

Copy link
Copy Markdown
Contributor

Extend the explanation in the commit message, force push.

But the second commit has no proper description. I have a similar patch laying around...you may wanna take that... 😉

meson: Simplify evaluation of compiler options

[Why]
It has become quite verbose to first check and then eventually add
the compiler option. Luckily for us, meson has 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.

[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>
@Finii Finii force-pushed the feature/build-on-older-macos branch from 4986d95 to f3bf0d8 Compare June 3, 2026 07:53
@Finii Finii merged commit 9a06f65 into main Jun 3, 2026
3 checks passed
@Finii Finii deleted the feature/build-on-older-macos branch June 3, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants