From: Debian Rust Maintainers Date: Wed, 20 Sep 2023 18:18:40 +0000 (+0100) Subject: d-fix-rustix-outline X-Git-Tag: archive/raspbian/1.70.0+dfsg1-1+rpi1^2~31 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ca46603be2344f4cd054721d90e703734c2a6573;p=rustc.git 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 --- diff --git a/vendor/rustix/Cargo.toml b/vendor/rustix/Cargo.toml index b560499a8c..85ed6d6aba 100644 --- a/vendor/rustix/Cargo.toml +++ b/vendor/rustix/Cargo.toml @@ -125,9 +125,9 @@ version = "0.6" [dev-dependencies.tempfile] version = "3.4.0" -[build-dependencies.cc] +[build-dependencies.cc_dep] version = "1.0.68" -optional = true +package = "cc" [features] all-apis = [ @@ -242,6 +242,7 @@ features = [ "Win32_NetworkManagement_IpHelper", "Win32_System_Threading", ] +cc = [] [target."cfg(windows)".dev-dependencies.ctor] version = "0.1.21" diff --git a/vendor/rustix/build.rs b/vendor/rustix/build.rs index d8d1c8bd6e..cbb6e77835 100644 --- a/vendor/rustix/build.rs +++ b/vendor/rustix/build.rs @@ -1,5 +1,4 @@ -#[cfg(feature = "cc")] -use cc::Build; +use cc_dep::Build; use std::env::var; use std::io::Write; @@ -158,16 +157,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