8000 Rollup of 10 pull requests by tmandry · Pull Request #68474 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 10 pull requests #68474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
470cdf5
add bare metal ARM Cortex-A targets to rustc
japaric Jan 15, 2020
de38803
Add -Wl,-znotext to default linker flags to link with lld 9 on FreeBS…
Jan 19, 2020
a3a0776
Merge branch 'master' into bare-metal-cortex-a
japaric Jan 20, 2020
2c0845c
Mark __msan_track_origins as an exported symbol for LTO
nikic Jan 19, 2020
d8c661a
Mark __msan_keep_going as an exported symbol for LTO
tmiasko Jan 21, 2020
dd0507c
Make `TooGeneric` error in WF checking a proper error
varkor Jan 20, 2020
8abbd0b
for now, do not build rust-std for the armv7a-none-eabihf target
japaric Jan 21, 2020
5dee7dd
Handle methods in try diagnostic
phi-gamma Jan 21, 2020
02e66ba
Test try diagnostics for impl and trait methods
phi-gamma Jan 21, 2020
db3b40c
Cleanup: rewrite conditional as match
phi-gamma Jan 21, 2020
d1bb7e1
Privatize private fields of OutputFilenames
Mark-Simulacrum Jan 21, 2020
8c6067c
Store filestem in a pre-formatted form
Mark-Simulacrum Jan 21, 2020
dc97181
Do not base path to append extension
Mark-Simulacrum Jan 21, 2020
eb2da27
bootstrap: update clippy subcmd decription
matthiaskrgr Jan 22, 2020
7962ccb
pprust: use as_deref
Centril Jan 22, 2020
71370c8
librustc_mir: don't allocate vectors where slices will do.
matthiaskrgr Jan 22, 2020
6a6ebb4
Add `-Z no-link` flag
Dec 21, 2019
0c3827b
Rollup merge of #67195 - 0dvictor:nolink, r=tmandry
tmandry Jan 23, 2020
9246b30
Rollup merge of #68253 - japaric:bare-metal-cortex-a, r=alexcrichton
tmandry Jan 23, 2020
51e4424
Rollup merge of #68361 - t6:patch-freebsd-lld-i386, r=alexcrichton
tmandry Jan 23, 2020
bd090c9
Rollup merge of #68388 - varkor:toogeneric-wf, r=eddyb
tmandry Jan 23, 2020
f9b0561
Rollup merge of #68409 - sinkuu:temp_path, r=Mark-Simulacrum
tmandry Jan 23, 2020
97ac259
Rollup merge of #68410 - tmiasko:msan-lto, r=varkor
tmandry Jan 23, 2020
1077ada
Rollup merge of #68425 - phi-gamma:try-method, r=varkor
tmandry Jan 23, 2020
ac3e183
Rollup merge of #68440 - matthiaskrgr:xpyclippy, r=Mark-Simulacrum
tmandry Jan 23, 2020
14e6259
Rollup merge of #68441 - Centril:pprust-as_deref, r=Mark-Simulacrum
tmandry Jan 23, 2020
bfac73c
Rollup merge of #68462 - matthiaskrgr:novec, r=varkor
tmandry Jan 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mark __msan_track_origins as an exported symbol for LTO
  • Loading branch information
nikic authored and tmiasko committed Jan 20, 2020
commit 2c0845c6ccfdee7fb255756918a22101376efa7e
8 changes: 7 additions & 1 deletion src/librustc_codegen_ssa/back/symbol_export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;

use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use rustc::middle::exported_symbols::{metadata_symbol_name, ExportedSymbol, SymbolExportLevel};
use rustc::session::config;
use rustc::session::config::{self, Sanitizer};
use rustc::ty::query::Providers;
use rustc::ty::subst::SubstsRef;
use rustc::ty::Instance;
Expand Down Expand Up @@ -206,6 +206,12 @@ fn exported_symbols_provider_local(
}));
}

if let Some(Sanitizer::Memory) = tcx.sess.opts.debugging_opts.sanitizer {
// Similar to profiling, preserve weak msan symbol during LTO.
let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new("__msan_track_origins"));
symbols.push((exported_symbol, SymbolExportLevel::C));
}

if tcx.sess.crate_types.borrow().contains(&config::CrateType::Dylib) {
let symbol_name = metadata_symbol_name(tcx);
let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new(&symbol_name));
Expand Down
6 changes: 5 additions & 1 deletion src/test/codegen/sanitizer-memory-track-orgins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
// needs-sanitizer-support
// only-linux
// only-x86_64
// revisions:MSAN-0 MSAN-1 MSAN-2
// revisions:MSAN-0 MSAN-1 MSAN-2 MSAN-1-LTO MSAN-2-LTO
//
//[MSAN-0] compile-flags: -Zsanitizer=memory
//[MSAN-1] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins=1
//[MSAN-2] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins
//[MSAN-1-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins=1 -C lto=fat
//[MSAN-2-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-memory-track-origins -C lto=fat

#![crate_type="lib"]

// MSAN-0-NOT: @__msan_track_origins
// MSAN-1: @__msan_track_origins = weak_odr local_unnamed_addr constant i32 1
// MSAN-2: @__msan_track_origins = weak_odr local_unnamed_addr constant i32 2
// MSAN-1-LTO: @__msan_track_origins = weak_odr local_unnamed_addr constant i32 1
// MSAN-2-LTO: @__msan_track_origins = weak_odr local_unnamed_addr constant i32 2
//
// MSAN-0-LABEL: define void @copy(
// MSAN-1-LABEL: define void @copy(
Expand Down
0