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

macOS: drop explicit -arch flags #24

Merged
merged 1 commit into from
May 11, 2021
Merged

macOS: drop explicit -arch flags #24

merged 1 commit into from
May 11, 2021

Conversation

zeha
Copy link
Contributor

@zeha zeha commented Dec 24, 2020

Fixes #23.

Without -arch x86_64, the Apple toolchain automatically picks the target based upon the current runtime architecture.

Meaning:

  • on Apple Silicon, running natively (= aarch64), the resulting binary will be for aarch64 (good!)
  • on Apple Silicon, running under Rosetta, emulating x86_64, the resulting binary will be for x86_64 (good!)

Tests done:

  • Builds on aarch64 macOS 11.1, Xcode 12.2 Apple clang version 12.0.0 (clang-1200.0.32.28). Both native and under Rosetta.
  • Builds on x86_64 macOS 11.1, Xcode 12.2 Apple clang version 12.0.0 (clang-1200.0.32.27).
  • My app works with a native (aarch64) Erlang 23.2.1 from Homebrew now.

@zeha
Copy link
Contributor Author

zeha commented May 7, 2021

@deadtrickster friendly ping - do you have objections/hints about this? thanks!

@deadtrickster deadtrickster merged commit 7869753 into deadtrickster:master May 11, 2021
@deadtrickster
Copy link
Owner

Thank you for the PR and for the ping!

@bieniusa
Copy link

bieniusa commented Feb 6, 2022

@deadtrickster I just ran into that issue - thanks for the fix!
Would it be possible to release a new version on hex?

@zeha zeha deleted the darwin-no-explicit-arch branch February 6, 2022 13:23
@bieniusa bieniusa mentioned this pull request Feb 8, 2022
@samgranieri
Copy link

@deadtrickster could you please release a new version of this on hex? Several engineers at my company are getting m1 Macs, and we use this library in every single one of our elixir apps. I'd rather not tell my colleagues to pin to a git ref if possible. Thanks for all the great work!

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.

Always builds x86_64 binary on Darwin
4 participants