detee-sgx/build.rs

14 lines
594 B
Rust

fn main() {
// TODO: make this conditional on occlum feature
// TODO: should be conditional on the target platform (musl vs glibc)
println!("cargo:rustc-link-search=/opt/occlum/toolchains/dcap_lib/musl");
// Cargo will automatically know it must look for `libocclum_dcap.a`
println!("cargo:rustc-link-lib=occlum_dcap");
// TODO: make this conditional if compiling grpcs examples
tonic_build::configure()
.build_server(true)
.compile(&["examples/echo.proto"], &["examples"])
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
}