diff --git a/Cargo.toml b/Cargo.toml index f012438..08c18c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ exclude = ["docs"] [package.metadata.docs.rs] # All features except simulator and rustc-dep-of-std. -features = ["allocator", "ckb-types", "calc-hash", "dlopen-c", "ckb2023"] +features = ["allocator", "ckb-types", "libc", "calc-hash", "build-with-clang", "dlopen-c", "ckb2023"] rustdoc-args = ["--cfg", "docsrs"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/build.rs b/build.rs index f2b7f2a..5c79316 100644 --- a/build.rs +++ b/build.rs @@ -14,6 +14,7 @@ fn main() { .file("c/dlopen.c") .define("CKB_DECLARATION_ONLY", None); setup_compiler_flags(&mut build); + build.include("c/ckb-c-stdlib"); build.compile("dl-c-impl"); } @@ -35,12 +36,11 @@ fn setup_compiler_flags(build: &mut cc::Build) { .flag("-fvisibility=hidden") .flag("-fdata-sections") .flag("-ffunction-sections") - .include("c/ckb-c-stdlib") - .include("c/ckb-c-stdlib/libc") .flag("-Wall") .flag("-Werror") .flag("-Wno-unused-parameter") - .flag("-Wno-nonnull"); + .flag("-Wno-nonnull") + .include("c/ckb-c-stdlib/libc"); let clang = match std::env::var_os("CLANG") { Some(val) => val, diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index 3766e1e..6899c33 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -51,7 +51,7 @@ dependencies = [ [[package]] name = "ckb-std" -version = "0.14.3" +version = "0.15.0" dependencies = [ "buddy-alloc", "cc",