File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 86
86
end
87
87
88
88
if platform . is_macos?
89
- # For OS X, we should optimize for an older architecture than Apple
89
+ proj . setting ( :cppflags , "-I#{ proj . includedir } " )
90
+ proj . setting ( :cflags , proj . cppflags . to_s )
91
+
92
+ # For OS X, we should optimize for an older x86 architecture than Apple
90
93
# currently ships for; there's a lot of older xeon chips based on
91
94
# that architecture still in use throughout the Mac ecosystem.
92
95
# Additionally, OS X doesn't use RPATH for linking. We shouldn't
93
96
# define it or try to force it in the linker, because this might
94
97
# break gcc or clang if they try to use the RPATH values we forced.
95
- proj . setting ( :cppflags , "-I #{ proj . includedir } " )
96
- proj . setting ( :cflags , "-march=core2 -msse4 #{ proj . cppflags } " )
98
+ proj . setting ( :cflags , "-march=core2 -msse4 #{ proj . cflags } " ) unless platform . architecture == 'arm64'
99
+
97
100
proj . setting ( :ldflags , "-L#{ proj . libdir } " )
98
101
end
99
102
Original file line number Diff line number Diff line change 128
128
proj . setting ( :ldflags , "-L#{ proj . tools_root } /lib -L#{ proj . gcc_root } /lib -L#{ proj . libdir } " )
129
129
elsif platform . is_macos?
130
130
proj . setting ( :cppflags , "-I#{ proj . includedir } " )
131
+ proj . setting ( :cflags , "#{ proj . cppflags } " )
131
132
132
133
# Since we are cross-compiling for later use, we can only optimize for
133
134
# the oldest supported platform and even up to macOS 10.13 there are
134
135
# 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'
136
137
137
138
# OS X doesn't use RPATH for linking. We shouldn't
138
139
# 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