summary refs log tree commit diff
path: root/src/librustc/driver
AgeCommit message (Collapse)AuthorLines
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-0/+2
2014-10-02rollup merge of #17682 : nodakai/librustc-handy-versionAlex Crichton-4/+20
2014-10-02auto merge of #17590 : bjadamson/rust/rustc-improvements, r=alexcrichtonbors-5/+2
Removes an unnecessary allocation when passing the command line arguments to the librustc driver.
2014-10-02auto merge of #17681 : jgallagher/rust/dep-info-escape-spaces, r=alexcrichtonbors-1/+7
cc #17627
2014-10-02librustc/driver: expose build information of rustc.NODA, Kai-4/+20
CFG_RELEASE, CFG_VER_HASH and CFG_VER_DATE were only available as an output to stdout from the driver::version() function that had an inconvenient signature.
2014-10-01Make --dep-info escape spaces in filenamesJohn Gallagher-1/+7
Closes #17627
2014-10-01Limit recursion depth for macro expansions, closes #17628Florian Hahn-0/+1
2014-09-30Remove unnecessary allocation, update API name for starting the rustc driver.Benjamin Adamson-5/+2
2014-09-29rollup merge of #17592 : kmcallister/inline-asm-locAlex Crichton-0/+2
2014-09-29rollup merge of #17576 : kmcallister/hide-quotesAlex Crichton-1/+2
2014-09-28auto merge of #17527 : sfackler/rust/cfg-syntax, r=alexcrichtonbors-2/+2
We'll need a snapshot before we can convert the codebase over and turn on the deprecation warnings. cc #17490 This is sitting on top of #17506
2014-09-27Convert cfg syntax to new systemSteven Fackler-2/+2
This removes the ability to use `foo(bar)` style cfgs. Switch them to `foo_bar` or `foo="bar"` instead. [breaking-change]
2014-09-27Translate inline assembly errors back to source locationsKeegan McAllister-0/+2
Fixes #17552.
2014-09-26Hide the quote_*! macros when the feature gate is offKeegan McAllister-1/+2
This makes it easier to experiment with improved quasiquoting as an ordinary plugin library. The list of quote macros in feature_gate.rs was already out of sync; this commit also prevents that problem in the future.
2014-09-25Remove the last redundant check from kindck, and then remove the pass as well.Niko Matsakis-3/+7
2014-09-25auto merge of #17378 : Gankro/rust/hashmap-entry, r=aturonbors-2/+6
Deprecates the `find_or_*` family of "internal mutation" methods on `HashMap` in favour of the "external mutation" Entry API as part of RFC 60. Part of #17320, but this still needs to be done on the rest of the maps. However they don't have any internal mutation methods defined, so they can be done without deprecating or breaking anything. Work on `BTree` is part of the complete rewrite in #17334. The implemented API deviates from the API described in the RFC in two key places: * `VacantEntry.set` yields a mutable reference to the inserted element to avoid code duplication where complex logic needs to be done *regardless* of whether the entry was vacant or not. * `OccupiedEntry.into_mut` was added so that it is possible to return a reference into the map beyond the lifetime of the Entry itself, providing functional parity to `VacantEntry.set`. This allows the full find_or_insert functionality to be implemented using this API. A PR will be submitted to the RFC to amend this. [breaking-change]
2014-09-24handling fallout from entry apiAlexis Beingessner-2/+6
2014-09-22Revert "Prefer bundled gcc. External gcc can still be used if one provides ↵Alex Crichton-2/+2
a full path via -Clinker=..." This reverts commit 94f05324fee6cd4637adc01f441fafd09e678668.
2014-09-21auto merge of #17419 : anchovieshat/rust/remove_no_opt, r=cmrbors-5/+1
Closes #13649
2014-09-21auto merge of #17412 : vadimcn/rust/gccpref, r=alexcrichtonbors-2/+2
Fixes #17251
2014-09-21Move -Z lto to -C lto.Colin Davidson-3/+3
Closes #12443
2014-09-21Remove -Z no-opt flag.Colin Davidson-5/+1
Closes #13649
2014-09-20Prefer bundled gcc. External gcc can still be used if one provides a full ↵Vadim Chugunov-2/+2
path via -Clinker=...
2014-09-19rollup merge of #17338 : nick29581/variants-namespaceAlex Crichton-5/+5
2014-09-19Add enum variants to the type namespaceNick Cameron-5/+5
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-18rustc: move freevar finding to resolve.Eduard Burtescu-11/+9
2014-09-17auto merge of #17264 : bkoropoff/rust/issue-17252, r=nick29581bors-0/+3
Recursive items are currently detected in the `check_const` pass which runs after type checking. This means a recursive static item used as an array length will cause type checking to blow the stack. This PR separates the recursion check out into a separate pass which is run before type checking. Closes issue #17252 r? @nick29581
2014-09-17move feature_gate to libsyntaxNick Cameron-8/+19
2014-09-17move std_inject to libsyntaxNick Cameron-2/+8
2014-09-17move most of front to libsyntaxNick Cameron-15/+9
2014-09-16Fallout from renamingAaron Turon-15/+15
2014-09-15auto merge of #17208 : kmcallister/rust/llvm-diagnostics, r=thestingerbors-3/+42
I would like to map this information back to AST nodes, so that we can print remarks with spans, and so that remarks can be enabled on a per-function basis. Unfortunately, doing this would require a lot more code restructuring — for example, we currently throw away the AST map and lots of other information before LLVM optimizations run. So for the time being, we print the remarks with debug location strings from LLVM. There's a warning if you use `-C remark` without `--debuginfo`. Fixes #17116.
2014-09-14Separate static item recursion check into its own passBrian Koropoff-0/+3
This new pass is run before type checking so that recursive items are detected beforehand. This prevents going into an infinite recursion during type checking when a recursive item is used in an array type. As a bonus, use `span_err` instead of `span_fatal` so multiple errors can be reported. Closes issue #17252
2014-09-14rustc: fix fallout from using ptr::P.Eduard Burtescu-116/+113
2014-09-12Add -C remark for LLVM optimization remarksKeegan McAllister-1/+40
Fixes #17116.
2014-09-12Fix bad error message copypastaKeegan McAllister-2/+2
2014-09-11Append target-specific tools directory ($(RUST)/bin/rustlib/<triple>/bin/) ↵Vadim Chugunov-3/+19
to PATH during linking, so that rustc can invoke them.
2014-09-08rustc: fix fallout from the addition of a 'tcx lifetime on tcx.Eduard Burtescu-6/+6
2014-09-08rustc: use a TypedArena to allocate types in the type context.Eduard Burtescu-10/+17
2014-09-08auto merge of #16933 : nick29581/rust/dst-rvalue, r=nikomatsakisbors-0/+3
Closes #16813 r? @nikomatsakis I feel like I should be checking more things in check_rvalues, but not sure what - I don't properly understand expr_use_visitor
2014-09-08Forbid unsized rvaluesNick Cameron-0/+3
Closes #16813
2014-09-07Changed addl_lib_search_paths from HashSet to Vecinrustwetrust-3/+3
This makes the extra library paths given to the gcc linker come in the same order as the -L options on the rustc command line.
2014-09-05run optimization and codegen on worker threadsStuart Pernsteiner-4/+17
Refactor the code in `llvm::back` that invokes LLVM optimization and codegen passes so that it can be called from worker threads. (Previously, it used `&Session` extensively, and `Session` is not `Share`.) The new code can handle multiple compilation units, by compiling each unit to `crate.0.o`, `crate.1.o`, etc., and linking together all the `crate.N.o` files into a single `crate.o` using `ld -r`. The later linking steps can then be run unchanged. The new code preserves the behavior of `--emit`/`-o` when building a single compilation unit. With multiple compilation units, the `--emit=asm/ir/bc` options produce multiple files, so combinations like `--emit=ir -o foo.ll` will not actually produce `foo.ll` (they instead produce several `foo.N.ll` files). The new code supports `-Z lto` only when using a single compilation unit. Compiling with multiple compilation units and `-Z lto` will produce an error. (I can't think of any good reason to do such a thing.) Linking with `-Z lto` against a library that was built as multiple compilation units will also fail, because the rlib does not contain a `crate.bytecode.deflate` file. This could be supported in the future by linking together the `crate.N.bc` files produced when compiling the library into a single `crate.bc`, or by making the LTO code support multiple `crate.N.bytecode.deflate` files.
2014-09-05move back::link::write into a separate fileStuart Pernsteiner-25/+26
2014-09-05split CrateContext into shared and local piecesStuart Pernsteiner-0/+1
Break up `CrateContext` into `SharedCrateContext` and `LocalCrateContext`. The local piece corresponds to a single compilation unit, and contains all LLVM-related components. (LLVM data structures are tied to a specific `LLVMContext`, and we will need separate `LLVMContext`s to safely run multithreaded optimization.) The shared piece contains data structures that need to be shared across all compilation units, such as the `ty::ctxt` and some tables related to crate metadata.
2014-08-30auto merge of #16419 : huonw/rust/pretty-expanded-hygiene, r=pnkfelixbors-555/+619
Different Identifiers and Names can have identical textual representations, but different internal representations, due to the macro hygiene machinery (syntax contexts and gensyms). This provides a way to see these internals by compiling with `--pretty expanded,hygiene`. This is useful for debugging & hacking on macros (e.g. diagnosing https://github.com/rust-lang/rust/issues/15750/https://github.com/rust-lang/rust/issues/15962 likely would've been faster with this functionality). E.g. ```rust #![feature(macro_rules)] // minimal junk #![no_std] macro_rules! foo { ($x: ident) => { y + $x } } fn bar() { foo!(x) } ``` ```rust #![feature(macro_rules)] // minimal junk #![no_std] fn bar /* 61#0 */() { y /* 60#2 */ + x /* 58#3 */ } ```
2014-08-30rustc: implement a pretty mode to print ident/name's ctxt & gensyms.Huon Wilson-0/+50
`--pretty expanded,hygiene` is helpful with debugging macro issues, since two identifiers/names can be textually the same, but different internally (resulting in weird "undefined variable" errors).
2014-08-30Add lint groups; define built-in lint groups `bad_style` and `unused`P1start-13/+61
This adds support for lint groups to the compiler. Lint groups are a way of grouping a number of lints together under one name. For example, this also defines a default lint for naming conventions, named `bad_style`. Writing `#[allow(bad_style)]` is equivalent to writing `#[allow(non_camel_case_types, non_snake_case, non_uppercase_statics)]`. These lint groups can also be defined as a compiler plugin using the new `Registry::register_lint_group` method. This also adds two built-in lint groups, `bad_style` and `unused`. The contents of these groups can be seen by running `rustc -W help`.
2014-08-29rustc: remove a trait that is unnecessary after pretty move.Huon Wilson-31/+21
The type in the `impl` is now in the module with the trait.
2014-08-29rustc: move pretty printing into its own module.Huon Wilson-555/+579
There's a lot of it, and it's a fairly well-defined/separate chunk of code, so it might as well be separate.