Commit Graph

30 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu
fff08cb043 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
17cdd356da rustc: replace TyCtxt<'tcx, 'gcx, 'tcx> with TyCtxt<'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
2441253508 Fix fallout from deny(unused_lifetimes). 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
37799a5552 rustc: replace TyCtxt<'a, 'gcx, 'tcx> with TyCtxt<'tcx, 'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Nicholas Nethercote
faf5eac854 Move metadata encoding earlier.
This commit separates metadata encoding (`tcx.encode_metadata`) from the
creation of the metadata module (which is now handled by
`write_compressed_metadata`, formerly `write_metadata`).

The metadata encoding now occurs slightly earlier in the pipeline, at
the very start of code generation within `start_codegen`.

Metadata *writing* still occurs near the end of compilation; that will
be moved forward in subsequent commits.
2019-04-30 14:55:10 +10:00
bjorn3
ca2ff089f3 Remove MetadataOnlyCodegenBackend 2019-03-16 10:54:38 +01:00
John Kåre Alsaker
51938c61f6 Make the rustc driver and interface demand driven 2019-03-10 04:49:45 +01:00
Mazdak Farrokhzad
d7a4dd1074
Rollup merge of #58259 - taiki-e:librustc_codegen_utils-2018, r=Centril
librustc_codegen_utils => 2018

Transitions `librustc_codegen_utils` to Rust 2018; cc #58099

r? @Centril
2019-02-09 00:15:59 +01:00
Taiki Endo
0e622a8ba1 librustc_codegen_utils => 2018 2019-02-08 21:06:07 +09:00
Guillaume Gomez
8b886e07f5 Remove images' url to make it work even without internet connection 2019-02-07 11:06:19 +01:00
lqd
e5318f3f9b MetadataOnlyCodegenBackend: remove is_inline call
This function has no side effects, and its result is ignored.
2019-01-09 14:21:46 +01:00
lqd
c075e245de Codegen: run the collector only once
Use the `collect_and_partition_mono_items ` query to avoid calling the collector
2019-01-07 19:48:45 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Andy Russell
2f6226518b
use top level fs functions where appropriate
This commit replaces many usages of `File::open` and reading or writing
with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code
complexity, and will improve performance for most reads, since the
functions allocate the buffer to be the size of the file.

I believe that this commit will not impact behavior in any way, so some
matches will check the error kind in case the file was not valid UTF-8.
Some of these cases may not actually care about the error.
2018-12-07 12:54:11 -05:00
ljedrz
adaeb10b5b codegen_utils, driver: fix clippy errors 2018-12-06 21:14:23 +01:00
Oliver Scherer
3c9258e604 Prefer Default::default over FxHash*::default in struct constructors 2018-10-19 14:34:44 +02:00
Oliver Scherer
ee81739dc1 Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
bjorn3
d52047faf0 Remove LinkMeta struct 2018-08-18 12:08:06 +02:00
Mark Rousskov
0ae2aa2320 Use diagnostic API on Session 2018-08-04 06:54:36 -06:00
Mark Rousskov
2a9344206b Normalize variants of CrateType to standard style
This is a clippy-breaking change.
2018-08-04 06:53:15 -06:00
ljedrz
715b8852e4 Deny bare trait objects in in src/librustc_codegen_utils 2018-07-11 17:39:49 +02:00
Alex Crichton
42eb85002a Upgrade to LLVM's master branch (LLVM 7)
This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-10 13:43:01 -07:00
bjorn3
c7c534fa0e Move llvm_target_features back to llvm_util 2018-07-07 10:55:47 +02:00
bjorn3
cd4989ee94 Leave fixme comment 2018-07-07 10:52:18 +02:00
bjorn3
097de536e4 Fix metadata_only metadata encoding 2018-07-07 10:52:15 +02:00
bjorn3
95ed511514 Mostly fix compiling without LLVM (with metadata_only backend) 2018-07-07 10:51:51 +02:00
bjorn3
6ceb1637b2 Move some functions out of rustc_codegen_llvm and fix metadata_only backend 2018-07-07 10:47:22 +02:00
Eduard-Mihai Burtescu
5a5c7ded0d rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
Irina Popa
b63d7e2b1c Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00