From 88ed461002bf45501915bf96d769a8159f9237dd Mon Sep 17 00:00:00 2001 From: Debian Rust Maintainers Date: Fri, 17 May 2024 08:38:11 +0200 Subject: [PATCH] d-fix-rustix-outline Always enable cc even if the feature is not enabled. Some Debian architectures need outline asm, and Debian does not ship pre-built outline asm. Gbp-Pq: Name d-fix-rustix-outline.patch --- vendor/rustix/Cargo.toml | 1 - vendor/rustix/build.rs | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vendor/rustix/Cargo.toml b/vendor/rustix/Cargo.toml index c92852650b..e9aab4faee 100644 --- a/vendor/rustix/Cargo.toml +++ b/vendor/rustix/Cargo.toml @@ -127,7 +127,6 @@ version = "3.4.0" [build-dependencies.cc] version = "1.0.68" -optional = true [features] all-apis = [ diff --git a/vendor/rustix/build.rs b/vendor/rustix/build.rs index 8b5c55a9d3..7c52accf31 100644 --- a/vendor/rustix/build.rs +++ b/vendor/rustix/build.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "cc")] use cc::Build; use std::env::var; use std::io::Write; @@ -162,16 +161,16 @@ fn link_in_librustix_outline(arch: &str, asm_name: &str) { println!("cargo:rerun-if-changed={}", to); // If "cc" is not enabled, use a pre-built library. - #[cfg(not(feature = "cc"))] + /*#[cfg(not(feature = "cc"))] { let _ = asm_name; println!("cargo:rustc-link-search={}/{}", OUTLINE_PATH, profile); println!("cargo:rustc-link-lib=static={}", name); - } + }*/ // If "cc" is enabled, build the library from source, update the pre-built // version, and assert that the pre-built version is checked in. - #[cfg(feature = "cc")] + //#[cfg(feature = "cc")] { let out_dir = var("OUT_DIR").unwrap(); // Add `-gdwarf-3` so that we always get the same output, regardless of -- 2.30.2