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 85
85
end
86
86
87
87
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
89
92
# currently ships for; there's a lot of older xeon chips based on
90
93
# that architecture still in use throughout the Mac ecosystem.
91
94
# Additionally, OS X doesn't use RPATH for linking. We shouldn't
92
95
# define it or try to force it in the linker, because this might
93
96
# 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
+
96
99
proj . setting ( :ldflags , "-L#{ proj . libdir } " )
97
100
end
98
101
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