diff options
| author | Afonso Bordado <afonsobordado@az8.co> | 2022-08-06 21:24:38 +0100 |
|---|---|---|
| committer | Afonso Bordado <afonsobordado@az8.co> | 2022-08-06 21:24:38 +0100 |
| commit | 7610be478f9e67a4e0e13cddb50f171e82cc3170 (patch) | |
| tree | d3ba892c1fd9a71ff4b52c162f354ff5d964beb1 | |
| parent | e5ba71a71b79525fdd649624af63fc8770f90835 (diff) | |
| download | rust-7610be478f9e67a4e0e13cddb50f171e82cc3170.tar.gz rust-7610be478f9e67a4e0e13cddb50f171e82cc3170.zip | |
Move abi-checker to y.rs test
| -rw-r--r-- | .github/workflows/main.yml | 5 | ||||
| -rw-r--r-- | build_system/abi_checker.rs | 14 | ||||
| -rw-r--r-- | build_system/mod.rs | 14 | ||||
| -rw-r--r-- | config.txt | 2 |
4 files changed, 16 insertions, 19 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b259369e61..e8897e9ae81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,11 +105,6 @@ jobs: ./y.rs test - - - name: Run abi-checker - if: matrix.env.TARGET_TRIPLE == '' - run: ./y.rs abi-checker - - name: Package prebuilt cg_clif run: tar cvfJ cg_clif.tar.xz build diff --git a/build_system/abi_checker.rs b/build_system/abi_checker.rs index 21d9afc8231..b6dc0fa6922 100644 --- a/build_system/abi_checker.rs +++ b/build_system/abi_checker.rs @@ -1,4 +1,5 @@ use super::build_sysroot; +use super::config; use super::utils::spawn_and_wait_with_input; use build_system::SysrootKind; use std::env; @@ -13,10 +14,15 @@ pub(crate) fn run( host_triple: &str, target_triple: &str, ) { - assert_eq!( - host_triple, target_triple, - "abi-checker not supported on cross-compilation scenarios" - ); + if !config::get_bool("testsuite.abi-checker") { + eprintln!("[SKIP] abi-checker"); + return; + } + + if host_triple != target_triple { + eprintln!("[SKIP] abi-checker (cross-compilation not supported)"); + return; + } eprintln!("Building sysroot for abi-checker"); build_sysroot::build_sysroot( diff --git a/build_system/mod.rs b/build_system/mod.rs index c5b3e6619b7..c3706dc6f82 100644 --- a/build_system/mod.rs +++ b/build_system/mod.rs @@ -22,9 +22,6 @@ fn usage() { eprintln!( " ./y.rs test [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]" ); - eprintln!( - " ./y.rs abi-checker [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]" - ); } macro_rules! arg_error { @@ -39,7 +36,6 @@ macro_rules! arg_error { enum Command { Build, Test, - AbiChecker, } #[derive(Copy, Clone, Debug)] @@ -71,7 +67,6 @@ pub fn main() { } Some("build") => Command::Build, Some("test") => Command::Test, - Some("abi-checker") => Command::AbiChecker, Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag), Some(command) => arg_error!("Unknown command {}", command), None => { @@ -147,9 +142,8 @@ pub fn main() { &host_triple, &target_triple, ); - } - Command::Build => { - build_sysroot::build_sysroot( + + abi_checker::run( channel, sysroot_kind, &target_dir, @@ -158,8 +152,8 @@ pub fn main() { &target_triple, ); } - Command::AbiChecker => { - abi_checker::run( + Command::Build => { + build_sysroot::build_sysroot( channel, sysroot_kind, &target_dir, diff --git a/config.txt b/config.txt index 5e4d230776d..2264d301d59 100644 --- a/config.txt +++ b/config.txt @@ -48,3 +48,5 @@ test.libcore test.regex-shootout-regex-dna test.regex test.portable-simd + +testsuite.abi-checker |
