about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back
AgeCommit message (Collapse)AuthorLines
2020-01-23Add projection query for upstream drop-glue instances.Michael Woerister-15/+48
This reduces the amount of invalidated data when new types are add to upstream crates.
2020-01-23Make drop-glue take advantage of -Zshare-generics.Michael Woerister-8/+20
2020-01-23Make ExportedSymbols type more local because it's not supposed to beMichael Woerister-4/+6
used outside of the LLVM backend.
2020-01-22Rollup merge of #68410 - tmiasko:msan-lto, r=varkorTyler Mandry-1/+11
Export weak symbols used by MemorySanitizer Export weak symbols defined by MemorySanitizer instrumentation, which are used to implement `-Zsanitizer-memory-track-origins` and `-Zsanitizer-recover=memory`. Previously, when using fat LTO, they would internalized and eliminated. Fixes #68367.
2020-01-23Add `-Z no-link` flagVictor Ding-0/+1
Adds a compiler option to allow rustc compile a crate without linking. With this flag, rustc serializes codegen_results into a .rlink file.
2020-01-22Enable ASan on FuchsiaAaron Green-1/+1
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-21Mark __msan_keep_going as an exported symbol for LTOTomasz Miąsko-2/+6
2020-01-20Mark __msan_track_origins as an exported symbol for LTONikita Popov-1/+7
2020-01-20Make sure that all upstream generics get re-exported from Rust dylibs.Michael Woerister-9/+38
2020-01-11Auto merge of #67458 - ↵bors-8/+18
pnkfelix:fix-66530-by-propagating-fatal-error-from-worker, r=matthewjasper When a codegen worker has a FatalError, propagate it instead of ICE'ing. Fix #66530
2020-01-11Rollup merge of #68043 - Zoxc:missing-timers, r=wesleywiserMazdak Farrokhzad-22/+36
Add some missing timers Based on https://github.com/rust-lang/rust/pull/67988 r? @wesleywiser
2020-01-10Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichtonbors-47/+42
build-std compatible sanitizer support ### Motivation When using `-Z sanitizer=*` feature it is essential that both user code and standard library is instrumented. Otherwise the utility of sanitizer will be limited, or its use will be impractical like in the case of memory sanitizer. The recently introduced cargo feature build-std makes it possible to rebuild standard library with arbitrary rustc flags. Unfortunately, those changes alone do not make it easy to rebuild standard library with sanitizers, since runtimes are dependencies of std that have to be build in specific environment, generally not available outside rustbuild process. Additionally rebuilding them requires presence of llvm-config and compiler-rt sources. The goal of changes proposed here is to make it possible to avoid rebuilding sanitizer runtimes when rebuilding the std, thus making it possible to instrument standard library for use with sanitizer with simple, although verbose command: ``` env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu ``` ### Implementation * Sanitizer runtimes are no long packed into crates. Instead, libraries build from compiler-rt are used as is, after renaming them into `librusc_rt.*`. * rustc obtains runtimes from target libdir for default sysroot, so that they are not required in custom build sysroots created with build-std. * The runtimes are only linked-in into executables to address issue #64629. (in previous design it was hard to avoid linking runtimes into static libraries produced by rustc as demonstrated by sanitizer-staticlib-link test, which still passes despite changes made in #64780). cc @kennytm, @japaric, @firstyear, @choller
2020-01-09Label unmarked timeJohn Kåre Alsaker-22/+36
2020-01-10Rollup merge of #67975 - EmbarkStudios:export-statics-wasm, r=alexcrichtonYuki Okushi-1/+1
Export public scalar statics in wasm Fixes #67453 I am not sure which export level statics should get when exporting them in wasm. This small change fixes the issue that I had, but this might not be the correct way to implement this.
2020-01-09Link sanitizer runtimes instead of injecting crate dependenciesTomasz Miąsko-47/+42
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-3/+3
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-1/+0
2020-01-07Always export static variables as SymbolExportLevel::C in wasmmaik-7/+2
2020-01-07Export scalar statics in wasmmaik-1/+6
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-7/+7
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-35/+21
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-2/+1
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-2/+3
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-4/+4
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-30When a codegen worker has a FatalError, propagate it instead of ICE'ing.Felix S. Klock II-8/+18
2019-12-29Move reachable_set query in librustc_passes.Camille GILLOT-2/+1
2019-12-25tidy: change msdn links to newer locationsLzu Tao-3/+3
see accouncement at https://docs.microsoft.com/welcome-to-docs
2019-12-22Format the worldMark Rousskov-873/+843
2019-12-06Rename to `then_some` and `then`varkor-2/+2
2019-12-06Use `to_option_with` in several placesvarkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-10/+2
2019-12-03Rollup merge of #66957 - parthsane:pvs/ftx_lld_linker, r=alexcrichtonMazdak Farrokhzad-1/+2
Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld Changed linker for `x86_64-fortanix-unknown-sgx` target to `rust-lld` This change needed the RelaxELFRelocations flag to be set for it to work correctly r? @jethrogb
2019-12-03Move cgu_reuse_tracker to librustc_sessionMark Rousskov-1/+1
2019-12-03Decouple CguReuseTracker from SessionMark Rousskov-1/+1
2019-12-03Change linker for x86_64-fortanix-unknown-sgx to rust-lldParth Sane-1/+2
For SGX, the relocation using the relocation table is done by the code in rust/src/libstd/sys/sgx/abi/reloc.rs and this code should not require relocation. Setting RelaxELFRelocations flag if allows this to happen, hence adding a Target Option for it.
2019-12-01rustc_plugin: Remove support for plugins adding LLVM passesVadim Petrochenkov-3/+0
2019-11-26Auto merge of #66522 - tmiasko:sanitize-flags, r=alexcrichtonbors-17/+12
Add support for sanitizer recover and tracking origins of uninitialized memory * Add support for sanitizer recovery `-Zsanitizer-recover=...` (equivalent to `-fsanitize-recover` in clang). * Add support for tracking origins of uninitialized memory in MemorySanitizer `-Zsanitizer-memory-track-origins` (equivalent to `-fsanitize-memory-track-origins` in clang).
2019-11-23make `./x.py bench` againMazdak Farrokhzad-2/+2
2019-11-22Add support for tracking origins of uninitialized memoryTomasz Miąsko-0/+4
2019-11-22Add support for sanitizer recoveryTomasz Miąsko-0/+3
2019-11-22Move sanitizer passes creation from ssa to llvmTomasz Miąsko-17/+5
2019-11-15Remove SourceMapper traitMark Rousskov-2/+3
SourceMap is now in the root of all rustc-specific crates, syntax_pos, so there's no need for the trait object to decouple the dependencies between librustc_errors and libsyntax as was needed previously.
2019-11-13Rollup merge of #66335 - Mark-Simulacrum:self-profile-to-data, ↵Yuki Okushi-1/+1
r=michaelwoerister Move self-profile infrastructure to data structures The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal). This is intended as a precursor to moving Session out of librustc, but since that involves lots of smaller steps that move around code I'm splitting it up into separate PRs.
2019-11-12Move self-profile infrastructure to data structuresMark Rousskov-1/+1
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
2019-11-11Move allocator_kind to CrateStoreMark Rousskov-1/+1
Similarly to the previous commit, there's no need for this to be in Session and have a Once around it.
2019-11-02Remove the `AsRef` impl for `SymbolStr`.Nicholas Nethercote-1/+1
Because it's highly magical, which goes against the goal of keeping `SymbolStr` simple. Plus it's only used in a handful of places that only require minor changes.
2019-11-02Simplify various `Symbol` use points.Nicholas Nethercote-3/+3
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch of unnecessary sigils.
2019-11-01Rollup merge of #66018 - pnkfelix:issue-64872-revert-64324, r=alexcrichtonTyler Mandry-15/+4
Revert PR 64324: dylibs export generics again (for now) As discussed on PR #65781, this is a targeted attempt to undo the main semantic change from PR #64324, by putting `dylib` back in the set of crate types that export generic symbols. The main reason to do this is that PR #64324 had unanticipated side-effects that caused bugs like #64872, and in the opinion of @alexcrichton and myself, the impact of #64872 is worse than #64319. In other words, it is better for us, in the short term, to reopen #64319 as currently unfixed for now than to introduce new bugs like #64872. Fix #64872 Reopen #64319