Skip to content

FEAT: Universal Mac Builds - Unified WHL for ARM64 and Intel #86

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

Merged

Conversation

bewithgaurav
Copy link
Collaborator

@bewithgaurav bewithgaurav commented Jun 19, 2025

Summary

This pull request introduces changes to standardize macOS builds by adopting the "universal2" architecture, which supports both arm64 and x86_64. The updates simplify the build process, ensure consistency across tools, and improve compatibility. Key changes include modifications to the CMake configuration, build scripts, and Python packaging setup.

macOS Build Standardization:

  • mssql_python/pybind/CMakeLists.txt: Replaced architecture-specific logic with a universal2 configuration for macOS, setting ARCHITECTURE to "universal2" and ensuring CMAKE_OSX_ARCHITECTURES is set to arm64;x86_64. Updated WHEEL_ARCH to "universal2" for macOS builds. [1] [2] [3]

  • mssql_python/pybind/build.sh: Simplified the macOS build script by removing architecture-specific handling and ensuring the build process defaults to creating universal2 binaries. Added diagnostics to verify the resulting binary. [1] [2]

Python Packaging Updates:

  • setup.py: Updated macOS-specific logic to always use the "universal2" platform tag (macosx_15_0_universal2) for wheel packaging. Removed architecture detection and replaced it with a unified configuration. [1] [2]

These changes streamline the macOS build process, reduce complexity, and ensure compatibility with both Apple Silicon and Intel-based Macs.

Issue Reference

Fixes AB#37761

Checklist

  • Tests Passed (if applicable)
  • Code is formatted
  • Docs Updated (if necessary)

Testing Performed

  • Unit Tests

Additional Notes

@bewithgaurav bewithgaurav changed the title FEAT: Universal Mac Builds and Support FEAT: Universal Mac Builds - Unified WHL for ARM64 and Intel Jun 19, 2025
@bewithgaurav bewithgaurav merged commit 8e10c7d into bewithgaurav/build_macos Jun 19, 2025
2 checks passed
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.

3 participants