about summary refs log tree commit diff
path: root/src/test/run-make/issue-19371
AgeCommit message (Collapse)AuthorLines
2018-03-22rustc: Add a `#[wasm_custom_section]` attributeAlex Crichton-97/+0
This commit is an implementation of adding custom sections to wasm artifacts in rustc. The intention here is to expose the ability of the wasm binary format to contain custom sections with arbitrary user-defined data. Currently neither our version of LLVM nor LLD supports this so the implementation is currently custom to rustc itself. The implementation here is to attach a `#[wasm_custom_section = "foo"]` attribute to any `const` which has a type like `[u8; N]`. Other types of constants aren't supported yet but may be added one day! This should hopefully be enough to get off the ground with *some* custom section support. The current semantics are that any constant tagged with `#[wasm_custom_section]` section will be *appended* to the corresponding section in the final output wasm artifact (and this affects dependencies linked in as well, not just the final crate). This means that whatever is interpreting the contents must be able to interpret binary-concatenated sections (or each constant needs to be in its own custom section). To test this change the existing `run-make` test suite was moved to a `run-make-fulldeps` folder and a new `run-make` test suite was added which applies to all targets by default. This test suite currently only has one test which only runs for the wasm target (using a node.js script to use `WebAssembly` in JS to parse the wasm output).
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-14/+16
2018-01-27rustc: Load the `rustc_trans` crate at runtimeAlex Crichton-2/+1
Building on the work of # 45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement # 46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.
2018-01-19Allow runtime switching between trans backendsbjorn3-6/+18
2017-12-19Fix a `compile_input` testvarkor-1/+1
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-5/+5
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-3/+4
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-2/+1
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-12Remove the `cstore` reference from Session in order to prepare encapsulating ↵Michael Woerister-1/+1
CrateStore access in tcx.
2017-09-09rustc: Remove `DepGraph` handling from rustc_metadataAlex Crichton-1/+1
This should now be entirely tracked through queries, so no need to have a `DepGraph` in the `CStore` object any more!
2017-05-15Remove rustc_llvm dependency from librustcRobin Kruppe-0/+1
Consequently, session creation can no longer initialize LLVM. The few places that use the compiler without going through rustc_driver/CompilerCalls thus need to be careful to manually initialize LLVM (via rustc_trans!) immediately after session creation. This means librustc is not rebuilt when LLVM changes.
2017-05-14Remove rustc_llvm dependency from rustc_metadataRobin Kruppe-1/+2
Move the code for loading metadata from rlibs and dylibs from rustc_metadata into rustc_trans, and introduce a trait to avoid introducing a direct dependency on rustc_trans. This means rustc_metadata is no longer rebuilt when LLVM changes.
2016-11-21Fix fallout in `rustdoc` and tests.Jeffrey Seyfried-1/+2
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-8/+2
2016-08-11Remove the 'cfg' field from session::config::Options.Michael Woerister-2/+2
The 'cfg' in the Options struct is only the commandline-specified subset of the crate configuration and it's almost always wrong to read that instead of the CrateConfig in HIR crate node.
2016-08-11Add the notion of a dependency tracking status to commandline arguments.Michael Woerister-2/+3
Commandline arguments influence whether incremental compilation can use its compilation cache and thus their changes relative to previous compilation sessions need to be taking into account. This commit makes sure that one has to specify for every commandline argument whether it influences incremental compilation or not.
2016-07-11Avoid passing around the thread-local interner in `librustc_metadata`.Jeffrey Seyfried-2/+1
2016-06-23Address more travis errorsJonathan Turner-1/+2
2016-05-18thread the DepGraph to session/crate-storeNiko Matsakis-2/+4
This is a [breaking-change] for plugin authors. You must now create a dep-graph earlier.
2016-03-14Allow custom filenames for anonymous inputsmitaa-2/+2
2016-02-07Add compile-fail test in rustdocGuillaume Gomez-1/+1
2016-01-26Initial work towards abort-free compilationNick Cameron-1/+1
The goal is that the compiler will pass `Result`s around rather than using abort_if_errors. To preserve behaviour we currently abort at the top level. I've removed all other aborts from the driver, but haven't touched any of the nested aborts.
2015-12-21Register new snapshotsAlex Crichton-2/+1
Lots of cruft to remove!
2015-11-26fix tests & rustdocAriel Ben-Yehuda-1/+2
2015-11-26make check worksAriel Ben-Yehuda-5/+10
2015-09-30rustc: Support output filenames for each emit typeAlex Crichton-3/+3
Currently the compiler supports the ability to emit multiple output types as part of one compilation (e.g. asm, LLVM IR, bytecode, link, dep-info, etc). It does not, however, support the ability to customize the output filename for each of these output types. The `-o` flag is ignored if multiple emit types are specified (and the compiler emits a warning about this). Normally this doesn't matter too much, but in the case of `dep-info` it can lead to a number of problems (e.g. see #28716). By allowing customization of the output filename for each emit type we're able to solve the problems in that issue. This commit adds support for the `--emit` option to the compiler to look like: rustc foo.rs --emit dep-info=.deps/foo.d,link This indicates that the `dep-info` output type will be placed at `.deps/foo.d` and the `link` output type will otherwise be determined via the `--out-dir` and `-o` flags. Closes #28716
2015-04-30Add metadata output to the diagnostics system.Michael Sproul-1/+1
Diagnostic errors are now checked for uniqueness across the compiler and error metadata is written to JSON files.
2015-03-23Test fixes and rebase conflicts, round 2Alex Crichton-3/+3
2015-03-23Require feature attributes, and add them where necessaryBrian Anderson-0/+2
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-4/+6
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-02-28Separate most of rustc::lint::builtin into a separate crate.Huon Wilson-0/+2
This pulls out the implementations of most built-in lints into a separate crate, to reduce edit-compile-test iteration times with librustc_lint and increase parallelism. This should enable lints to be refactored, added and deleted much more easily as it slashes the edit-compile cycle to get a minimal working compiler to test with (`make rustc-stage1`) from librustc -> librustc_typeck -> ... -> librustc_driver -> libcore -> ... -> libstd to librustc_lint -> librustc_driver -> libcore -> ... libstd which is significantly faster, mainly due to avoiding the librustc build itself. The intention would be to move as much as possible of the infrastructure into the crate too, but the plumbing is deeply intertwined with librustc itself at the moment. Also, there are lints for which diagnostics are registered directly in the compiler code, not in their own crate traversal, and their definitions have to remain in librustc. This is a [breaking-change] for direct users of the compiler APIs: callers of `rustc::session::build_session` or `rustc::session::build_session_` need to manually call `rustc_lint::register_builtins` on their return value. This should make #22206 easier.
2015-02-16Replace some uses of deprecated os functionsSimonas Kazlauskas-1/+1
This commit mostly replaces some of the uses of os::args with env::args.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-2/+2
2015-01-20Make error code registration work again. #19624Brian Anderson-1/+1
2015-01-12Make the compilation process more easily customisableNick Cameron-2/+4
2014-12-05Fix various references in late-running tests and thingsNiko Matsakis-4/+4
2014-11-29Fix rustc panic on second compile_inputMurarth-0/+71