Repace use of static_nobundle
with native_link_modifiers
This fixes warning 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) ```
This commit is contained in:
parent
cf708558b7
commit
a076f2b9b4
6 changed files with 6 additions and 7 deletions
|
@ -288,7 +288,7 @@ fn main() {
|
||||||
let path = PathBuf::from(s);
|
let path = PathBuf::from(s);
|
||||||
println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display());
|
println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display());
|
||||||
if target.contains("windows") {
|
if target.contains("windows") {
|
||||||
println!("cargo:rustc-link-lib=static-nobundle={}", stdcppname);
|
println!("cargo:rustc-link-lib=static:-bundle={}", stdcppname);
|
||||||
} else {
|
} else {
|
||||||
println!("cargo:rustc-link-lib=static={}", stdcppname);
|
println!("cargo:rustc-link-lib=static={}", stdcppname);
|
||||||
}
|
}
|
||||||
|
@ -302,6 +302,6 @@ fn main() {
|
||||||
// Libstdc++ depends on pthread which Rust doesn't link on MinGW
|
// Libstdc++ depends on pthread which Rust doesn't link on MinGW
|
||||||
// since nothing else requires it.
|
// since nothing else requires it.
|
||||||
if target.contains("windows-gnu") {
|
if target.contains("windows-gnu") {
|
||||||
println!("cargo:rustc-link-lib=static-nobundle=pthread");
|
println!("cargo:rustc-link-lib=static:-bundle=pthread");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(static_nobundle)]
|
#![feature(native_link_modifiers)]
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
|
|
||||||
// NOTE: This crate only exists to allow linking on mingw targets.
|
// NOTE: This crate only exists to allow linking on mingw targets.
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#![feature(native_link_modifiers_bundle)]
|
#![feature(native_link_modifiers_bundle)]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(static_nobundle)]
|
|
||||||
#![feature(c_unwind)]
|
#![feature(c_unwind)]
|
||||||
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// C++ code.
|
// C++ code.
|
||||||
|
|
||||||
// For linking libstdc++ on MinGW
|
// For linking libstdc++ on MinGW
|
||||||
#![cfg_attr(all(windows, target_env = "gnu"), feature(static_nobundle))]
|
#![cfg_attr(all(windows, target_env = "gnu"), feature(native_link_modifiers))]
|
||||||
#![feature(c_unwind)]
|
#![feature(c_unwind)]
|
||||||
|
|
||||||
use std::panic::{catch_unwind, AssertUnwindSafe};
|
use std::panic::{catch_unwind, AssertUnwindSafe};
|
||||||
|
|
|
@ -120,7 +120,7 @@ else
|
||||||
# So we end up with the following hack: we link use static-nobundle to only
|
# So we end up with the following hack: we link use static-nobundle to only
|
||||||
# link the parts of libstdc++ that we actually use, which doesn't include
|
# link the parts of libstdc++ that we actually use, which doesn't include
|
||||||
# the dependency on the pthreads DLL.
|
# the dependency on the pthreads DLL.
|
||||||
EXTRARSCXXFLAGS := -l static-nobundle=stdc++
|
EXTRARSCXXFLAGS := -l static:-bundle=stdc++
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Tests that linking to C++ code with global destructors works.
|
// Tests that linking to C++ code with global destructors works.
|
||||||
|
|
||||||
// For linking libstdc++ on MinGW
|
// For linking libstdc++ on MinGW
|
||||||
#![cfg_attr(all(windows, target_env = "gnu"), feature(static_nobundle))]
|
#![cfg_attr(all(windows, target_env = "gnu"), feature(native_link_modifiers))]
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn get() -> u32;
|
fn get() -> u32;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue