Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump cargo version #449

Merged
merged 3 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-c"
version = "0.10.9+cargo-0.85.0"
version = "0.10.10+cargo-0.86.0"
authors = ["Luca Barbato <[email protected]>"]
description = "Helper program to build and install c-like libraries"
license = "MIT"
Expand Down Expand Up @@ -28,7 +28,7 @@ name = "cargo-ctest"
path = "src/bin/ctest.rs"

[dependencies]
cargo = "0.85.0"
cargo = "0.86.0"
cargo-util = "0.2"
semver = "1.0.3"
log = "0.4"
Expand Down
5 changes: 2 additions & 3 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ pub fn cbuild(
for m in ws.members_mut().filter(|p| is_relevant_package(p)) {
let cpkg = CPackage::from_package(m, args, library_types, &rustc_target, &root_output)?;

pristine |= cpkg.finger_print.load_previous().is_err();
pristine |= cpkg.finger_print.load_previous().is_err() || !cpkg.finger_print.is_valid();

members.push(cpkg);
}
Expand Down Expand Up @@ -1188,8 +1188,7 @@ pub fn cbuild(

for cpkg in members.iter_mut() {
// it is a new build, build the additional files and update update the cache
// if the hash value does not match.
if new_build || !cpkg.finger_print.is_valid() {
if new_build {
let name = &cpkg.capi_config.library.name;
let (pkg_config_static_libs, static_libs) = if library_types.only_cdylib() {
(String::new(), String::new())
Expand Down
36 changes: 15 additions & 21 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ fn base_cli() -> Command {
"Build all benches",
"Build all targets",
)
.arg(
multi_opt(
"library-type",
"LIBRARY-TYPE",
"Build only a type of library",
)
.global(true)
.ignore_case(true)
.value_parser(["cdylib", "staticlib"]),
)
.arg_profile("Build artifacts with the specified profile")
.arg_features()
.arg_target_triple("Build for the target triple")
Expand Down Expand Up @@ -151,16 +161,6 @@ pub fn subcommand_build(name: &'static str, about: &'static str) -> Command {
base_cli()
.name(name)
.about(about)
.arg(
multi_opt(
"library-type",
"LIBRARY-TYPE",
"Build only a type of library",
)
.global(true)
.ignore_case(true)
.value_parser(["cdylib", "staticlib"]),
)
.arg_release("Build artifacts in release mode, with optimizations")
.arg_package_spec_no_all(
"Package to build (see `cargo help pkgid`)",
Expand All @@ -180,16 +180,6 @@ pub fn subcommand_install(name: &'static str, about: &'static str) -> Command {
base_cli()
.name(name)
.about(about)
.arg(
multi_opt(
"library-type",
"LIBRARY-TYPE",
"Build only a type of library",
)
.global(true)
.ignore_case(true)
.value_parser(["cdylib", "staticlib"]),
)
.arg(flag("debug", "Build in debug mode instead of release mode"))
.arg_release(
"Build artifacts in release mode, with optimizations. This is the default behavior.",
Expand All @@ -210,9 +200,13 @@ the --debug flag will use the `dev` profile instead.

pub fn subcommand_test(name: &'static str) -> Command {
base_cli()
.trailing_var_arg(true)
.name(name)
.about("Test the crate C-API")
.arg(
Arg::new("TESTNAME")
.action(ArgAction::Set)
.help("If specified, only run tests containing this string in their names"),
)
.arg(
Arg::new("args")
.help("Arguments for the test binary")
Expand Down