Skip to content

Commit 7760cd0

Browse files
committed
Auto merge of #69293 - Dylan-DPC:rollup-imcbvgo, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #68863 (ci: switch macOS builders to 10.15) - #69142 (Add shared script for linkchecking books.) - #69248 (Don't eliminate frame pointers on thumb targets) - #69280 (Remove special case for `simd_shuffle` arg promotion) - #69284 (Reword OpenOptions::{create, create_new} doc.) Failed merges: r? @ghost
2 parents 7d6b8c4 + a97f354 commit 7760cd0

File tree

18 files changed

+164
-73
lines changed

18 files changed

+164
-73
lines changed

src/bootstrap/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,10 +1051,10 @@ impl Step for Compiletest {
10511051
cmd.arg("--docck-python").arg(builder.python());
10521052

10531053
if builder.config.build.ends_with("apple-darwin") {
1054-
// Force /usr/bin/python on macOS for LLDB tests because we're loading the
1054+
// Force /usr/bin/python3 on macOS for LLDB tests because we're loading the
10551055
// LLDB plugin's compiled module which only works with the system python
10561056
// (namely not Homebrew-installed python)
1057-
cmd.arg("--lldb-python").arg("/usr/bin/python");
1057+
cmd.arg("--lldb-python").arg("/usr/bin/python3");
10581058
} else {
10591059
cmd.arg("--lldb-python").arg(builder.python());
10601060
}

src/ci/azure-pipelines/auto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- job: macOS
6464
timeoutInMinutes: 600
6565
pool:
66-
vmImage: macos-10.13
66+
vmImage: macos-10.15
6767
steps:
6868
- template: steps/run.yml
6969
strategy:

src/ci/azure-pipelines/steps/run.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ steps:
5151
displayName: Install clang
5252
condition: and(succeeded(), not(variables.SKIP_JOB))
5353

54-
- bash: src/ci/scripts/switch-xcode.sh
55-
displayName: Switch to Xcode 9.3
56-
condition: and(succeeded(), not(variables.SKIP_JOB))
57-
5854
- bash: src/ci/scripts/install-wix.sh
5955
displayName: Install wix
6056
condition: and(succeeded(), not(variables.SKIP_JOB))

src/ci/azure-pipelines/try.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# - job: macOS
2626
# timeoutInMinutes: 600
2727
# pool:
28-
# vmImage: macos-10.13
28+
# vmImage: macos-10.15
2929
# steps:
3030
# - template: steps/run.yml
3131
# strategy:

src/ci/scripts/install-clang.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ if isMacOS; then
1919
# native clang is configured to use the correct path, but our custom one
2020
# doesn't. This sets the SDKROOT environment variable to the SDK so that
2121
# our own clang can figure out the correct include path on its own.
22-
if ! [[ -d "/usr/include" ]]; then
23-
ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)"
24-
fi
22+
ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)"
2523

2624
# Configure `AR` specifically so rustbuild doesn't try to infer it as
2725
# `clang-ar` by accident.

src/ci/scripts/switch-xcode.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/librustc_mir/const_eval/eval_queries.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ fn eval_body_using_ecx<'mir, 'tcx>(
7272
Ok(ret)
7373
}
7474

75-
/// The `InterpCx` is only meant to be used to do field and index projections into constants for
76-
/// `simd_shuffle` and const patterns in match arms.
75+
/// The `InterpCx` is only meant to be used to do field and index projections into promoteds
76+
/// and const patterns in match arms.
7777
///
7878
/// The function containing the `match` that is currently being analyzed may have generic bounds
7979
/// that inform us about the generic bounds of the constant. E.g., using an associated constant

src/librustc_mir/transform/promote_consts.rs

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use rustc_span::{Span, DUMMY_SP};
2424
use syntax::ast::LitKind;
2525

2626
use rustc_index::vec::{Idx, IndexVec};
27-
use rustc_target::spec::abi::Abi;
2827

2928
use std::cell::Cell;
3029
use std::{cmp, iter, mem, usize};
@@ -106,11 +105,10 @@ pub enum Candidate {
106105
/// Promotion of the `x` in `[x; 32]`.
107106
Repeat(Location),
108107

109-
/// Currently applied to function calls where the callee has the unstable
110-
/// `#[rustc_args_required_const]` attribute as well as the SIMD shuffle
111-
/// intrinsic. The intrinsic requires the arguments are indeed constant and
112-
/// the attribute currently provides the semantic requirement that arguments
113-
/// must be constant.
108+
/// Function calls where the callee has the unstable
109+
/// `#[rustc_args_required_const]` attribute. The attribute requires that
110+
/// the arguments be constant, usually because they are encoded as an
111+
/// immediate operand in a platform intrinsic.
114112
Argument { bb: BasicBlock, index: usize },
115113
}
116114

@@ -218,17 +216,6 @@ impl<'tcx> Visitor<'tcx> for Collector<'_, 'tcx> {
218216

219217
if let TerminatorKind::Call { ref func, .. } = *kind {
220218
if let ty::FnDef(def_id, _) = func.ty(self.body, self.tcx).kind {
221-
let fn_sig = self.tcx.fn_sig(def_id);
222-
if let Abi::RustIntrinsic | Abi::PlatformIntrinsic = fn_sig.abi() {
223-
let name = self.tcx.item_name(def_id);
224-
// FIXME(eddyb) use `#[rustc_args_required_const(2)]` for shuffles.
225-
if name.as_str().starts_with("simd_shuffle") {
226-
self.candidates.push(Candidate::Argument { bb: location.block, index: 2 });
227-
228-
return; // Don't double count `simd_shuffle` candidates
229-
}
230-
}
231-
232219
if let Some(constant_args) = args_required_const(self.tcx, def_id) {
233220
for index in constant_args {
234221
self.candidates.push(Candidate::Argument { bb: location.block, index });
@@ -730,8 +717,7 @@ pub fn validate_candidates(
730717
.filter(|&candidate| {
731718
validator.explicit = candidate.forces_explicit_promotion();
732719

733-
// FIXME(eddyb) also emit the errors for shuffle indices
734-
// and `#[rustc_args_required_const]` arguments here.
720+
// FIXME(eddyb) also emit the errors for `#[rustc_args_required_const]` arguments here.
735721

736722
let is_promotable = validator.validate_candidate(candidate).is_ok();
737723
match candidate {

src/librustc_target/spec/thumb_base.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ pub fn opts() -> TargetOptions {
5050
// until we figure a way to add the pretty printers without requiring a volatile load cf.
5151
// rust-lang/rust#44993.
5252
emit_debug_gdb_scripts: false,
53+
// LLVM is eager to trash the link register when calling `noreturn` functions, which
54+
// breaks debugging. Preserve LR by default to prevent that from happening.
55+
eliminate_frame_pointer: false,
5356
..Default::default()
5457
}
5558
}

src/libstd/fs.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -844,10 +844,7 @@ impl OpenOptions {
844844
self
845845
}
846846

847-
/// Sets the option for creating a new file.
848-
///
849-
/// This option indicates whether a new file will be created if the file
850-
/// does not yet already exist.
847+
/// Sets the option to create a new file, or open it if it already exists.
851848
///
852849
/// In order for the file to be created, [`write`] or [`append`] access must
853850
/// be used.
@@ -868,11 +865,10 @@ impl OpenOptions {
868865
self
869866
}
870867

871-
/// Sets the option to always create a new file.
868+
/// Sets the option to create a new file, failing if it already exists.
872869
///
873-
/// This option indicates whether a new file will be created.
874-
/// No file is allowed to exist at the target location, also no (dangling)
875-
/// symlink.
870+
/// No file is allowed to exist at the target location, also no (dangling) symlink. In this
871+
/// way, if the call succeeds, the file returned is guaranteed to be new.
876872
///
877873
/// This option is useful because it is atomic. Otherwise between checking
878874
/// whether a file exists and creating a new one, the file may have been

0 commit comments

Comments
 (0)