view lang/rust/patch-rust.patch @ 1302:24f4eb1ce46a

graphics/libpng: upgrade to 1.6.37
author David Demelier <markand@malikania.fr>
date Thu, 11 Nov 2021 19:59:05 +0100
parents e45b5d1810ab
children
line wrap: on
line source

$OpenBSD: patch-src_bootstrap_lib_rs,v 1.24 2019/09/29 08:23:17 semarie Exp $
let us compilation choice to be honored.
https://github.com/rust-lang/rust/issues/39900
Index: src/bootstrap/lib.rs
--- src/bootstrap/lib.rs.orig
+++ src/bootstrap/lib.rs
@@ -104,7 +104,7 @@
 //! also check out the `src/bootstrap/README.md` file for more information.
 
 // NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
+#![deny(rust_2018_idioms, unused_lifetimes)]
 
 #![feature(core_intrinsics)]
 #![feature(drain_filter)]
@@ -768,7 +768,6 @@ impl Build {
         // cc-rs because the build scripts will determine that for themselves.
         let mut base = self.cc[&target].args().iter()
                            .map(|s| s.to_string_lossy().into_owned())
-                           .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
                            .collect::<Vec<String>>();
 
         // If we're compiling on macOS then we add a few unconditional flags