|
|
@ -174,6 +174,7 @@ fn build_rocksdb() { |
|
|
|
|
|
|
|
|
|
|
|
fn build_snappy() { |
|
|
|
fn build_snappy() { |
|
|
|
let target = env::var("TARGET").unwrap(); |
|
|
|
let target = env::var("TARGET").unwrap(); |
|
|
|
|
|
|
|
let endianness = env::var("CARGO_CFG_TARGET_ENDIAN").unwrap(); |
|
|
|
|
|
|
|
|
|
|
|
let mut config = cc::Build::new(); |
|
|
|
let mut config = cc::Build::new(); |
|
|
|
config.include("snappy/"); |
|
|
|
config.include("snappy/"); |
|
|
@ -187,6 +188,10 @@ fn build_snappy() { |
|
|
|
config.flag("-std=c++11"); |
|
|
|
config.flag("-std=c++11"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if endianness == "big" { |
|
|
|
|
|
|
|
config.define("WORDS_BIGENDIAN", Some("1")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
config.file("snappy/snappy.cc"); |
|
|
|
config.file("snappy/snappy.cc"); |
|
|
|
config.file("snappy/snappy-sinksource.cc"); |
|
|
|
config.file("snappy/snappy-sinksource.cc"); |
|
|
|
config.file("snappy/snappy-c.cc"); |
|
|
|
config.file("snappy/snappy-c.cc"); |
|
|
|