Skip to content

Commit

Permalink
Remove code duplication in build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Jan 16, 2019
1 parent 4037e95 commit a7573aa
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,16 @@ fn main() {
.define("USE_Z3", "OFF")
.define("USE_CVC4", "OFF")
.build();

for lib in vec!["solc", "solidity", "yul", "langutil", "evmasm", "devcore"] {
println!("cargo:rustc-link-search=native={}/build/lib{}", dst.display(), lib);
println!("cargo:rustc-link-lib=static={}", lib);
}

println!("cargo:rustc-link-search=native={}/lib", dst.display());
println!("cargo:rustc-link-search=native={}/build/libsolc", dst.display());
println!("cargo:rustc-link-search=native={}/build/libsolidity", dst.display());
println!("cargo:rustc-link-search=native={}/build/libyul", dst.display());
println!("cargo:rustc-link-search=native={}/build/liblangutil", dst.display());
println!("cargo:rustc-link-search=native={}/build/libevmasm", dst.display());
println!("cargo:rustc-link-search=native={}/build/libdevcore", dst.display());

// jsoncpp dependency
println!("cargo:rustc-link-search=native={}/build/deps/lib", dst.display());
println!("cargo:rustc-link-lib=static=solc");
println!("cargo:rustc-link-lib=static=solidity");
println!("cargo:rustc-link-lib=static=yul");
println!("cargo:rustc-link-lib=static=langutil");
println!("cargo:rustc-link-lib=static=evmasm");
println!("cargo:rustc-link-lib=static=devcore");
println!("cargo:rustc-link-lib=static=jsoncpp");

println!("cargo:rustc-link-search=/usr/lib/");
Expand Down

0 comments on commit a7573aa

Please sign in to comment.