Skip to content

Commit

Permalink
mas: fix build on Apple Silicon (#58278)
Browse files Browse the repository at this point in the history
Its dependency will build for x86_64 unless explicitly asked to build for
another CPU.
  • Loading branch information
mistydemeo authored Jul 21, 2020
1 parent 9da848c commit beed6d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Formula/mas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ def install
# Working around build issues in dependencies
# - Prevent warnings from causing build failures
# - Prevent linker errors by telling all lib builds to use max size install names
# - Ensure dependencies build for the current CPU; otherwise Commandant will
# build for x86_64 when running arm64
xcconfig = buildpath/"Overrides.xcconfig"
xcconfig.write <<~EOS
GCC_TREAT_WARNINGS_AS_ERRORS = NO
OTHER_LDFLAGS = -headerpad_max_install_names
VALID_ARCHS = #{Hardware::CPU.arch}
EOS
ENV["XCODE_XCCONFIG_FILE"] = xcconfig

Expand Down

0 comments on commit beed6d7

Please sign in to comment.