Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Jun 26, 2024

Conversation

lesteve
Copy link
Contributor

@lesteve lesteve commented Jun 24, 2024

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

@jpakkane
Copy link
Member

@dcbaker
Copy link
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

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
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
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
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
37 checks passed
@lesteve
Copy link
Contributor Author

lesteve commented Jun 27, 2024

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

@lesteve lesteve deleted the submit/openmp-detection-macos branch June 27, 2024 03:52
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.

None yet

4 participants