From 72efc3ff821a2ba3f9eeb7933831c5e54a5dfc0f Mon Sep 17 00:00:00 2001 From: Brian Buchalter Date: Tue, 8 Jun 2021 14:36:38 -0600 Subject: [PATCH] Build native extensions on M1 --- ext/extconf.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/extconf.rb b/ext/extconf.rb index 6d925dab..08781ca6 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -19,7 +19,9 @@ $LDFLAGS << ' -static-libgcc -static-libstdc++' end -if enable_config('march-tune-native', false) +# darwin arm doesn't support native +# see: https://github.com/sass/sassc-ruby/issues/222 +if enable_config('march-tune-native', false) && Gem::Platform.local.cpu != 'arm64' $CFLAGS << ' -march=native -mtune=native' $CXXFLAGS << ' -march=native -mtune=native' end