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
Updates to the Meson build to fix portability issues and warnings #1737
Conversation
Argh, missed that PRs are not supposed to go to the default branch. Closing - will rebase and resubmit. |
And then that you already re-targeted, thanks @jajhall. Let me retest locally and fix the merge conflict. |
C is a required language it looks like, so just declare it normally in the `project()` call. The warning was: ``` meson.build:16: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build. ``` Also clean up a stylistic issue and wrong comments for the threads dependency - it is no longer required.
There was only one entry in `_linkto`, namely `highslib`. So the extra variable was not needed, removing it makes it clearer what is actually happening.
This is both safer and reduces the binary size of the Python extension modules that link against `libhighs.a`.
The hardcoding may not work, and the flags were not used on any platform other than Linux. This caused a lot of warnings when building on macOS.
Rather a lot of CI failures: are they expected @galabovaa ? |
The reason CI jobs on macOS are failing is because the |
Looks good to me, particularly since the changes only affect meson build code. The failures are due to different iteration counts on macOS arm64 and are not concerning. I can look at those if they still appear once this is merged in latest. |
Each commit has a commit message with more context. This reduces the build warnings to a small amount, only the ones that may need inspection or are perhaps better fixed rather than silenced (things like
-Wunused-variable
are safe to silence though).The changes to compiler flag handling are necessary for portability. The symbol visibility one avoids re-exporting ~2,000 private symbols in the shared libraries that link against a static
libhighs.a
. It also reduced binary size, by ~300 kb on macOS in a release build.