Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #662 from OP2/hardcode_m1_library
Browse files Browse the repository at this point in the history
pass gcc dir to linker on M1
  • Loading branch information
dham authored May 3, 2022
2 parents fc9c34a + 0a1e339 commit 8697788
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyop2/compilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,11 @@ class MacClangARMCompiler(MacClangCompiler):
"""A compiler for building a shared library on ARM based Mac systems."""
# See https://stackoverflow.com/q/65966969
_optflags = ("-O3", "-ffast-math", "-mcpu=apple-a14")
# Need to pass -L/opt/homebrew/opt/gcc/lib/gcc/11 to prevent linker error:
# ld: file not found: @rpath/libgcc_s.1.1.dylib for architecture arm64 This
# seems to be a homebrew configuration issue somewhere. Hopefully this
# requirement will go away at some point.
_ldflags = ("-dynamiclib", "-L/opt/homebrew/opt/gcc/lib/gcc/11")


class LinuxGnuCompiler(Compiler):
Expand Down

0 comments on commit 8697788

Please sign in to comment.