add more crates

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2023-12-09 17:48:52 +01:00
parent c04ae9a5c3
commit 7a094f17c0
22 changed files with 191 additions and 34 deletions
+25
View File
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: Apache-2.0
use std::{io::Read, process::Command};
fn main() {
let mut flags = String::new();
Command::new("llvm-config")
.args(["--cxxflags"])
.output()
.expect("llvm-config should be able to provide CXX flags")
.stdout
.as_slice()
.read_to_string(&mut flags)
.expect("llvm-config output should be utf8");
let mut builder = cc::Build::new();
flags
.split_whitespace()
.fold(&mut builder, |builder, flag| builder.flag(flag))
.cpp(true)
.file("src/linker.cpp")
.compile("liblinker.a");
println!("cargo:rerun-if-changed=build.rs");
}