mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-29 00:47:58 +00:00
Integrate benchmarks and differential tests against an EVM interpreter (#7)
This commit is contained in:
+17
-10
@@ -8,16 +8,7 @@ fn llvm_config(arg: &str) -> String {
|
||||
.unwrap_or_else(|_| panic!("output of `llvm-config {arg}` should be utf8"))
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut builder = cc::Build::new();
|
||||
llvm_config("--cxxflags")
|
||||
.split_whitespace()
|
||||
.fold(&mut builder, |builder, flag| builder.flag(flag))
|
||||
.flag("-Wno-unused-parameter")
|
||||
.cpp(true)
|
||||
.file("src/linker.cpp")
|
||||
.compile("liblinker.a");
|
||||
|
||||
fn set_rustc_link_flags() {
|
||||
println!("cargo:rustc-link-search=native={}", llvm_config("--libdir"));
|
||||
|
||||
for lib in [
|
||||
@@ -30,9 +21,25 @@ fn main() {
|
||||
"LLVMLTO",
|
||||
"LLVMTargetParser",
|
||||
"LLVMBinaryFormat",
|
||||
"LLVMDemangle",
|
||||
] {
|
||||
println!("cargo:rustc-link-lib=static={lib}");
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
println!("cargo:rustc-link-lib=dylib=stdc++");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
llvm_config("--cxxflags")
|
||||
.split_whitespace()
|
||||
.fold(&mut cc::Build::new(), |builder, flag| builder.flag(flag))
|
||||
.flag("-Wno-unused-parameter")
|
||||
.cpp(true)
|
||||
.file("src/linker.cpp")
|
||||
.compile("liblinker.a");
|
||||
|
||||
set_rustc_link_flags();
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user