Merge pull request #18759 from alebcay/restrict-native-optflags
shared: only fall back to -march=native on supported architectures
This commit is contained in:
commit
5a2c264d19
@ -7,8 +7,10 @@ module SharedEnvExtension
|
||||
@bottle_arch.to_sym
|
||||
elsif @build_bottle
|
||||
Hardware.oldest_cpu
|
||||
else
|
||||
elsif Hardware::CPU.intel? || Hardware::CPU.arm?
|
||||
:native
|
||||
else
|
||||
:none
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -27,6 +27,7 @@ module Hardware
|
||||
sig { returns(T::Hash[Symbol, String]) }
|
||||
def optimization_flags
|
||||
@optimization_flags ||= T.let({
|
||||
none: "",
|
||||
native: arch_flag("native"),
|
||||
ivybridge: "-march=ivybridge",
|
||||
sandybridge: "-march=sandybridge",
|
||||
|
Loading…
x
Reference in New Issue
Block a user