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

Remove obsolete linker options #3559

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
17 changes: 1 addition & 16 deletions kani-driver/src/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ where
.unwrap()
}

#[allow(dead_code)]
celinval marked this conversation as resolved.
Show resolved Hide resolved
pub fn print_obsolete(verbosity: &CommonArgs, option: &str) {
if !verbosity.quiet {
warning(&format!(
Expand Down Expand Up @@ -189,14 +190,6 @@ pub struct VerificationArgs {
#[arg(long, hide_short_help = true)]
pub only_codegen: bool,

/// Deprecated flag. This is a no-op since we no longer support the legacy linker and
/// it will be removed in a future Kani release.
#[arg(long, hide = true, conflicts_with("mir_linker"))]
pub legacy_linker: bool,
/// Deprecated flag. This is a no-op since we no longer support any other linker.
#[arg(long, hide = true)]
pub mir_linker: bool,

/// Specify the value used for loop unwinding in CBMC
#[arg(long)]
pub default_unwind: Option<u32>,
Expand Down Expand Up @@ -524,14 +517,6 @@ impl ValidateArgs for VerificationArgs {
}
}

if self.mir_linker {
print_obsolete(&self.common_args, "--mir-linker");
}

if self.legacy_linker {
print_obsolete(&self.common_args, "--legacy-linker");
}

// TODO: these conflicting flags reflect what's necessary to pass current tests unmodified.
// We should consider improving the error messages slightly in a later pull request.
if natives_unwind && extra_unwind {
Expand Down
2 changes: 1 addition & 1 deletion tests/cargo-kani/asm/global/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ crate_with_global_asm = { path = "crate_with_global_asm" }

[package.metadata.kani]
# Issue with MIR Linker on static constant.
flags = { enable-unstable = true, ignore-global-asm = true, mir-linker = true }
flags = { enable-unstable = true, ignore-global-asm = true }
13 changes: 0 additions & 13 deletions tests/cargo-kani/mir-linker/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions tests/cargo-kani/mir-linker/expected

This file was deleted.

29 changes: 0 additions & 29 deletions tests/cargo-kani/mir-linker/src/lib.rs
celinval marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

2 changes: 0 additions & 2 deletions tests/cargo-ui/ws-integ-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ members = [
[workspace.metadata.kani.flags]
workspace = true
tests = true
enable-unstable=true
mir-linker=true
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/basic_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion from using built-in references and pointers.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/basic_inner_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion from using built-in references and pointers.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/basic_outer_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion from using built-in references and pointers.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/box_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion when using boxes.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/box_inner_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion when using boxes.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/box_outer_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion when using boxes.
//! Tests are broken down into different crates to ensure that the reachability works for each case.
mod defs;
Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/custom_outer_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion when using a custom CoerceUnsized implementation.
//! Tests are broken down into different crates to ensure that the reachability works for each case.
#![feature(coerce_unsized)]
Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/double_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion when using box of box.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/rc_outer_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion from using reference counter.
//! Tests are broken down into different crates to ensure that the reachability works for each case.
mod defs;
Expand Down
1 change: 0 additions & 1 deletion tests/kani/UnsizedCoercion/trait_to_trait_coercion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
// kani-flags: --mir-linker --enable-unstable
//! Check the basic coercion from using built-in references and pointers.
//! Tests are broken down into different crates to ensure that the reachability works for each case.

Expand Down
5 changes: 0 additions & 5 deletions tests/perf/string/src/any_str.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// kani-flags: --enable-unstable --mir-linker
//
//! This test is to check MIR linker state of the art.
//! I.e.: Currently, this should fail with missing function definition.

#[kani::proof]
#[kani::unwind(4)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// kani-flags: --enable-unstable --mir-linker
//! Make sure we can handle explicit copy_nonoverlapping on empty string
//! This used to trigger an issue: https://github.com/model-checking/kani/issues/241

Expand Down
2 changes: 0 additions & 2 deletions tests/ui/mir-linker/generic-harness/incorrect.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// kani-flags: --enable-unstable --mir-linker
//
//! Checks that we correctly fail if the harness is a generic function.

#[kani::proof]
Expand Down
Loading