File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Rake::ExtensionTask.new('libsass', gem_spec) do |ext|
14
14
# Link C++ stdlib statically when building binary gems.
15
15
ext . cross_config_options << '--enable-static-stdlib'
16
16
17
+ ext . cross_config_options << '--disable-march-native'
18
+
17
19
ext . cross_compiling do |spec |
18
20
spec . files . reject! { |path | File . fnmatch? ( 'ext/*' , path ) }
19
21
Original file line number Diff line number Diff line change 14
14
15
15
$CXXFLAGS << ' -std=c++11'
16
16
17
- # Link stdlib statically when building binary gems.
18
- if enable_config ( 'static-stdlib' )
17
+ # Set to true when building binary gems
18
+ if enable_config ( 'static-stdlib' , false )
19
19
$LDFLAGS << ' -static-libgcc -static-libstdc++'
20
20
end
21
21
22
+ # Set to false when building binary gems
23
+ if enable_config ( 'march-native' , true )
24
+ $CFLAGS << ' -march=native'
25
+ $CXXFLAGS << ' -march=native'
26
+ end
27
+
28
+ if enable_config ( 'lto' , true )
29
+ $CFLAGS << ' -flto'
30
+ $CXXFLAGS << ' -flto'
31
+ $LDFLAGS << ' -flto'
32
+ end
33
+
22
34
# Disable noisy compilation warnings.
23
35
$warnflags = ''
24
36
$CFLAGS. gsub! ( /[\s +](-ansi|-std=[^\s ]+)/ , '' )
You can’t perform that action at this time.
0 commit comments