Skip to content

Commit 10893a9

Browse files
authored
Merge pull request #39189 from brson/beta-next
Beta next
2 parents ad78c04 + 5466c1b commit 10893a9

File tree

8 files changed

+38
-7
lines changed

8 files changed

+38
-7
lines changed

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.15.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.4
21+
CFG_PRERELEASE_VERSION=.5
2222

2323
ifeq ($(CFG_RELEASE_CHANNEL),stable)
2424
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"

src/bootstrap/check.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
//! This file implements the various regression test suites that we execute on
1414
//! our CI.
1515
16+
extern crate build_helper;
17+
1618
use std::collections::HashSet;
1719
use std::env;
1820
use std::fmt;
@@ -543,7 +545,7 @@ pub fn distcheck(build: &Build) {
543545
build.run(&mut cmd);
544546
build.run(Command::new("./configure")
545547
.current_dir(&dir));
546-
build.run(Command::new("make")
548+
build.run(Command::new(build_helper::make(&build.config.build))
547549
.arg("check")
548550
.current_dir(&dir));
549551
}

src/build_helper/lib.rs

+12
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
4747
None
4848
} else if target.contains("musl") {
4949
Some(PathBuf::from("ar"))
50+
} else if target.contains("openbsd") {
51+
Some(PathBuf::from("ar"))
5052
} else {
5153
let parent = cc.parent().unwrap();
5254
let file = cc.file_name().unwrap().to_str().unwrap();
@@ -61,6 +63,16 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
6163
}
6264
}
6365

66+
pub fn make(host: &str) -> PathBuf {
67+
if host.contains("bitrig") || host.contains("dragonfly") ||
68+
host.contains("freebsd") || host.contains("netbsd") ||
69+
host.contains("openbsd") {
70+
PathBuf::from("gmake")
71+
} else {
72+
PathBuf::from("make")
73+
}
74+
}
75+
6476
pub fn output(cmd: &mut Command) -> String {
6577
let output = match cmd.stderr(Stdio::inherit()).output() {
6678
Ok(status) => status,

src/liballoc_jemalloc/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn main() {
151151
cmd.arg(format!("--build={}", build_helper::gnu_target(&host)));
152152

153153
run(&mut cmd);
154-
let mut make = Command::new("make");
154+
let mut make = Command::new(build_helper::make(&host));
155155
make.current_dir(&build_dir)
156156
.arg("build_lib_static");
157157

src/librustc_llvm/build.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -230,18 +230,25 @@ fn main() {
230230
}
231231
}
232232

233+
// OpenBSD has a particular C++ runtime library name
234+
let stdcppname = if target.contains("openbsd") {
235+
"estdc++"
236+
} else {
237+
"stdc++"
238+
};
239+
233240
// C++ runtime library
234241
if !target.contains("msvc") {
235242
if let Some(s) = env::var_os("LLVM_STATIC_STDCPP") {
236243
assert!(!cxxflags.contains("stdlib=libc++"));
237244
let path = PathBuf::from(s);
238245
println!("cargo:rustc-link-search=native={}",
239246
path.parent().unwrap().display());
240-
println!("cargo:rustc-link-lib=static=stdc++");
247+
println!("cargo:rustc-link-lib=static={}", stdcppname);
241248
} else if cxxflags.contains("stdlib=libc++") {
242249
println!("cargo:rustc-link-lib=c++");
243250
} else {
244-
println!("cargo:rustc-link-lib=stdc++");
251+
println!("cargo:rustc-link-lib={}", stdcppname);
245252
}
246253
}
247254
}

src/libstd/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn build_libbacktrace(host: &str, target: &str) {
104104
.env("AR", &ar)
105105
.env("RANLIB", format!("{} s", ar.display()))
106106
.env("CFLAGS", cflags));
107-
run(Command::new("make")
107+
run(Command::new(build_helper::make(host))
108108
.current_dir(&build_dir)
109109
.arg(format!("INCDIR={}", src_dir.display()))
110110
.arg("-j").arg(env::var("NUM_JOBS").expect("NUM_JOBS was not set")));

src/test/run-pass/backtrace.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// ignore-android FIXME #17520
1212
// ignore-emscripten spawning processes is not supported
13+
// ignore-openbsd no support for libbacktrace without filename
1314
// compile-flags:-g
1415

1516
use std::env;

src/tools/compiletest/src/runtest.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,16 @@ actual:\n\
21082108
}
21092109
self.create_dir_racy(&tmpdir);
21102110

2111-
let mut cmd = Command::new("make");
2111+
let host = &self.config.host;
2112+
let make = if host.contains("bitrig") || host.contains("dragonfly") ||
2113+
host.contains("freebsd") || host.contains("netbsd") ||
2114+
host.contains("openbsd") {
2115+
"gmake"
2116+
} else {
2117+
"make"
2118+
};
2119+
2120+
let mut cmd = Command::new(make);
21122121
cmd.current_dir(&self.testpaths.file)
21132122
.env("TARGET", &self.config.target)
21142123
.env("PYTHON", &self.config.docck_python)

0 commit comments

Comments
 (0)