Skip to content

Commit 0cf784d

Browse files
authored
Rollup merge of #90205 - mati865:link-modifiers-in-rustc, r=petrochenkov
Repace use of `static_nobundle` with `native_link_modifiers` within Rust codebase This fixes warnings when building Rust and running tests: ``` warning: library kind `static-nobundle` has been superseded by specifying `-bundle` on library kind `static`. Try `static:-bundle` warning: `rustc_llvm` (lib) generated 2 warnings (1 duplicate) ```
2 parents 65c1a2e + a076f2b commit 0cf784d

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

compiler/rustc_llvm/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ fn main() {
288288
let path = PathBuf::from(s);
289289
println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display());
290290
if target.contains("windows") {
291-
println!("cargo:rustc-link-lib=static-nobundle={}", stdcppname);
291+
println!("cargo:rustc-link-lib=static:-bundle={}", stdcppname);
292292
} else {
293293
println!("cargo:rustc-link-lib=static={}", stdcppname);
294294
}
@@ -302,6 +302,6 @@ fn main() {
302302
// Libstdc++ depends on pthread which Rust doesn't link on MinGW
303303
// since nothing else requires it.
304304
if target.contains("windows-gnu") {
305-
println!("cargo:rustc-link-lib=static-nobundle=pthread");
305+
println!("cargo:rustc-link-lib=static:-bundle=pthread");
306306
}
307307
}

compiler/rustc_llvm/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(nll)]
2-
#![feature(static_nobundle)]
2+
#![feature(native_link_modifiers)]
33
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
44

55
// NOTE: This crate only exists to allow linking on mingw targets.

library/unwind/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(native_link_modifiers_bundle)]
66
#![feature(nll)]
77
#![feature(staged_api)]
8-
#![feature(static_nobundle)]
98
#![feature(c_unwind)]
109
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
1110

src/test/run-make-fulldeps/foreign-exceptions/foo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// C++ code.
44

55
// For linking libstdc++ on MinGW
6-
#![cfg_attr(all(windows, target_env = "gnu"), feature(static_nobundle))]
6+
#![cfg_attr(all(windows, target_env = "gnu"), feature(native_link_modifiers))]
77
#![feature(c_unwind)]
88

99
use std::panic::{catch_unwind, AssertUnwindSafe};

src/test/run-make-fulldeps/tools.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ else
120120
# So we end up with the following hack: we link use static-nobundle to only
121121
# link the parts of libstdc++ that we actually use, which doesn't include
122122
# the dependency on the pthreads DLL.
123-
EXTRARSCXXFLAGS := -l static-nobundle=stdc++
123+
EXTRARSCXXFLAGS := -l static:-bundle=stdc++
124124
endif
125125
else
126126
ifeq ($(UNAME),Darwin)

src/test/run-make/issue-36710/foo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Tests that linking to C++ code with global destructors works.
22

33
// For linking libstdc++ on MinGW
4-
#![cfg_attr(all(windows, target_env = "gnu"), feature(static_nobundle))]
4+
#![cfg_attr(all(windows, target_env = "gnu"), feature(native_link_modifiers))]
55

66
extern "C" {
77
fn get() -> u32;

0 commit comments

Comments
 (0)