File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 8585 end
8686
8787 if platform . is_macos?
88- # For OS X, we should optimize for an older architecture than Apple
88+ proj . setting ( :cppflags , "-I#{ proj . includedir } " )
89+ proj . setting ( :cflags , proj . cppflags . to_s )
90+
91+ # For OS X, we should optimize for an older x86 architecture than Apple
8992 # currently ships for; there's a lot of older xeon chips based on
9093 # that architecture still in use throughout the Mac ecosystem.
9194 # Additionally, OS X doesn't use RPATH for linking. We shouldn't
9295 # define it or try to force it in the linker, because this might
9396 # break gcc or clang if they try to use the RPATH values we forced.
94- proj . setting ( :cppflags , "-I #{ proj . includedir } " )
95- proj . setting ( :cflags , "-march=core2 -msse4 #{ proj . cppflags } " )
97+ proj . setting ( :cflags , "-march=core2 -msse4 #{ proj . cflags } " ) unless platform . architecture == 'arm64'
98+
9699 proj . setting ( :ldflags , "-L#{ proj . libdir } " )
97100 end
98101
Original file line number Diff line number Diff line change 128128 proj . setting ( :ldflags , "-L#{ proj . tools_root } /lib -L#{ proj . gcc_root } /lib -L#{ proj . libdir } " )
129129 elsif platform . is_macos?
130130 proj . setting ( :cppflags , "-I#{ proj . includedir } " )
131+ proj . setting ( :cflags , "#{ proj . cppflags } " )
131132
132133 # Since we are cross-compiling for later use, we can only optimize for
133134 # the oldest supported platform and even up to macOS 10.13 there are
134135 # a few Core 2 hardware platforms supported. (4 May 2018)
135- proj . setting ( :cflags , "-march=core2 -msse4 #{ proj . cppflags } " )
136+ proj . setting ( :cflags , "-march=core2 -msse4 #{ proj . cflags } " ) unless platform . architecture == 'arm64'
136137
137138 # OS X doesn't use RPATH for linking. We shouldn't
138139 # define it or try to force it in the linker, because this might
You can’t perform that action at this time.
0 commit comments