Skip to content

Detect OpenMP on macOS with Apple's Clang (rebased on master)#13350

Merged
eli-schwartz merged 7 commits intomesonbuild:masterfrom
lesteve:submit/openmp-detection-macos
Jun 26, 2024
Merged

Detect OpenMP on macOS with Apple's Clang (rebased on master)#13350
eli-schwartz merged 7 commits intomesonbuild:masterfrom
lesteve:submit/openmp-detection-macos

Conversation

@lesteve
Copy link
Copy Markdown
Contributor

@lesteve lesteve commented Jun 24, 2024

Supersedes and closes #13079. I followed @tristan957's advice in #13079 (comment).

@jpakkane
Copy link
Copy Markdown
Member

@dcbaker
Copy link
Copy Markdown
Member

dcbaker commented Jun 24, 2024

@lesteve sorry for dropping the ball on this, I've been super busy at work the last few weeks and haven't had as much time for keeping track of Meson stuff, like @jpakkane points out, we don't do back merges, so with a rebase I think this would be fine to land. I'll close the previous PR

dcbaker added 7 commits June 25, 2024 09:44
This will be needed by the Apple compiler
In case the OpenMP definition adds things like preprocessor directives
or include paths, like when building on MacOS with OpenMP from Homebrew.
It was probably done this way originally since we didn't have the
`fatal` keyword argument to avoid triggering the fatal-meson-warnings.

While we're here, replace the use of a `if bool` with an `else` on the
for loop.
Which requires injecting some extra paths and the `-Xpreprocess` flag,
as well as extra search paths for libomp and the headers.

Fixes: mesonbuild#7435
Instead of making the variable optional, just return if we hit the error
case, since that's all that's going to happen anyway
@lesteve lesteve force-pushed the submit/openmp-detection-macos branch from 18ff903 to 5f7c221 Compare June 25, 2024 07:45
@lesteve
Copy link
Copy Markdown
Contributor Author

lesteve commented Jun 25, 2024

OK thanks a lot for your feed-back, I used rebase this time and force pushed.

sorry for dropping the ball on this, I've been super busy at work the last few weeks and haven't had as much time for keeping track of Meson stuff,

@dcbaker no worries, I completely understand and thanks a lot for you work on this!

@jpakkane
Copy link
Copy Markdown
Member

Since this is a fairly hefty change, it will only be considered for 1.5 if there is an rc2.

@lesteve lesteve changed the title Detect OpenMP on macOS with Apple's Clang (with main merged) Detect OpenMP on macOS with Apple's Clang (rebased on master) Jun 25, 2024
@eli-schwartz
Copy link
Copy Markdown
Member

I think we are going to want an rc2 anyway. Changes look good to me. In it goes.

@eli-schwartz eli-schwartz merged commit ef83d94 into mesonbuild:master Jun 26, 2024
@lesteve
Copy link
Copy Markdown
Contributor Author

lesteve commented Jun 27, 2024

Great to see this merged, thanks a lot everyone 🙏!

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.

4 participants