Skip to content

Commit

Permalink
chore: tweak cargo.toml and build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
quake committed Jan 4, 2024
1 parent 8495d6b commit cd0ccf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cd0ccf4

Please sign in to comment.