|
|
|
@ -17,7 +17,10 @@ fn link(name: &str, bundled: bool) { |
|
|
|
|
|
|
|
|
|
fn fail_on_empty_directory(name: &str) { |
|
|
|
|
if fs::read_dir(name).unwrap().count() == 0 { |
|
|
|
|
println!("The `{}` directory is empty, did you forget to pull the submodules?", name); |
|
|
|
|
println!( |
|
|
|
|
"The `{}` directory is empty, did you forget to pull the submodules?", |
|
|
|
|
name |
|
|
|
|
); |
|
|
|
|
println!("Try `git submodule update --init --recursive`"); |
|
|
|
|
panic!(); |
|
|
|
|
} |
|
|
|
@ -42,7 +45,8 @@ fn build_rocksdb() { |
|
|
|
|
.collect::<Vec<&'static str>>(); |
|
|
|
|
|
|
|
|
|
// We have a pregenerated a version of build_version.cc in the local directory
|
|
|
|
|
lib_sources = lib_sources.iter() |
|
|
|
|
lib_sources = lib_sources |
|
|
|
|
.iter() |
|
|
|
|
.cloned() |
|
|
|
|
.filter(|file| *file != "util/build_version.cc") |
|
|
|
|
.collect::<Vec<&'static str>>(); |
|
|
|
@ -70,15 +74,14 @@ fn build_rocksdb() { |
|
|
|
|
config.define("OS_WIN", Some("1")); |
|
|
|
|
|
|
|
|
|
// Remove POSIX-specific sources
|
|
|
|
|
lib_sources = lib_sources.iter() |
|
|
|
|
lib_sources = lib_sources |
|
|
|
|
.iter() |
|
|
|
|
.cloned() |
|
|
|
|
.filter(|file| { |
|
|
|
|
match *file { |
|
|
|
|
.filter(|file| match *file { |
|
|
|
|
"port/port_posix.cc" | |
|
|
|
|
"util/env_posix.cc" | |
|
|
|
|
"util/io_posix.cc" => false, |
|
|
|
|
_ => true, |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.collect::<Vec<&'static str>>(); |
|
|
|
|
|
|
|
|
@ -96,6 +99,10 @@ fn build_rocksdb() { |
|
|
|
|
config.flag("-std=c++11"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// this was breaking the build on travis due to
|
|
|
|
|
// > 4mb of warnings emitted.
|
|
|
|
|
config.flag("-Wno-unused-parameter"); |
|
|
|
|
|
|
|
|
|
for file in lib_sources { |
|
|
|
|
let file = "rocksdb/".to_string() + file; |
|
|
|
|
config.file(&file); |
|
|
|
|