Enable processor-specific optimizations when available:

The SConstruct is modified to enable processor specific optimizations on clang and gcc toolchains. This improves the performance of RocksDB's CRC function. It might also enable other used libraries that are in the codebase now or in the future to apply cpu-specific optimisations. The mtune option ensures that a binary compiled on one machine will function on another,
This commit is contained in:
Donovan Hide
2014-10-31 18:33:16 +00:00
committed by Vinnie Falco
parent 73187d8832
commit e4c9822d78

View File

@@ -332,7 +332,9 @@ def config_env(toolchain, variant, env):
if variant == 'release':
env.Append(CCFLAGS=[
'-O3',
'-fno-strict-aliasing'
'-fno-strict-aliasing',
'-march=native',
'-mtune=native'
])
if toolchain != 'msvc':