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

Add cross files for macOS build #168

Merged
merged 5 commits into from
Oct 30, 2023
Merged

Add cross files for macOS build #168

merged 5 commits into from
Oct 30, 2023

Conversation

bgilbert
Copy link
Member

Update the Direct workflow to exercise it. Build for both x86_64 and arm64 (as macOS calls them) and merge the builds into universal binaries. Configure the slidetool binary to load libopenslide.1.dylib from the same directory. Create separate debuginfo.

Target macOS 11 and above, since those are the releases that aren't EOL. Use ld export filtering to export only OpenSlide's public symbols; it's safe to configure this globally because the build only produces one dylib.

Compiler hardening flags don't appear to be well-documented on macOS, but -fstack-protector-strong appears reasonable. Use it.

Use zlib, libffi, libxml2, and SQLite from the macOS SDK, rather than shipping our own copies. macOS also ships PCRE2, but its headers aren't included in the SDK, so don't use it.

Prep for later commit.

The build order is an implementation detail, so allow it to diverge from
the declaration order in build.sh.  The latter is used when building the
version table.

Signed-off-by: Benjamin Gilbert <[email protected]>
Prevent macOS builds in GitHub Actions from picking up libintl from
Homebrew.

Signed-off-by: Benjamin Gilbert <[email protected]>
gettext() is part of glibc.

Signed-off-by: Benjamin Gilbert <[email protected]>
@openslide-bot
Copy link
Contributor

openslide-bot commented Oct 30, 2023

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

and update the Direct workflow to exercise it.  Build for both x86_64 and
arm64 (as macOS calls them) and merge the builds into universal binaries.
Configure the slidetool binary to load libopenslide.1.dylib from the same
directory.  Create separate debuginfo.

Target macOS 11 and above, since those are the releases that aren't EOL.
Use ld export filtering to export only OpenSlide's public symbols; it's
safe to configure this globally because the build only produces one dylib.

Compiler hardening flags don't appear to be well-documented on macOS, but
-fstack-protector-strong appears reasonable.  Use it.

Use zlib, libffi, libxml2, and SQLite from the macOS SDK, rather than
shipping our own copies.  macOS also ships PCRE2, but its headers aren't
included in the SDK, so don't use it.

Signed-off-by: Benjamin Gilbert <[email protected]>
@bgilbert bgilbert merged commit b380bf3 into openslide:main Oct 30, 2023
12 checks passed
@bgilbert bgilbert deleted the macos branch October 30, 2023 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants