about summary refs log tree commit diff
path: root/src/comp/driver
AgeCommit message (Collapse)AuthorLines
2011-07-14rustc: Move much of metadata reading over to interior vectorsPatrick Walton-7/+6
2011-07-14Flag --test implies '--cfg test'. Issue #428Brian Anderson-6/+53
So certain code can be conditionally compiled only when building for testing
2011-07-13Make resolve and the typechecker check for a main fn of theTim Chevalier-1/+8
correct type This means if a non-library program leaves out the main program, the error gets caught earlier than link. Closes #626.
2011-07-11Move macro expansion to a separate phase, change macro syntax, and add ↵Paul Stansifer-14/+23
parse_sess to session.
2011-07-11Only print up to six lines on error. Print ^~~~~ to highlight error span.Josh Matthews-0/+1
2011-07-08Add just enough logic to the driver so that we can link std statically.Rafael Ávila de Espíndola-2/+10
2011-07-08Move external crate/lib resolution to its own passBrian Anderson-0/+2
The scope of external crate reading is beyond the resolve pass now, as it builds up tables of information needed for several different purposes.
2011-07-08Move used_link_args from session to cstoreBrian Anderson-9/+2
2011-07-08Move used_libraries from session to cstoreBrian Anderson-21/+4
2011-07-08Move used_crate_files from session to cstoreBrian Anderson-17/+4
2011-07-08Replace the crate cache in session with the one in cstoreBrian Anderson-8/+1
2011-07-08Introduce metadata::cstoreBrian Anderson-1/+4
I intend for this to be the location for storing all the data retrieved by creader, most of which is currently in the session.
2011-07-07Implement --lib --static.Rafael Ávila de Espíndola-8/+8
2011-07-07Use an early exit to reduce indentation.Rafael Ávila de Espíndola-72/+74
2011-07-07Command line changes for adding support for static libraries.Rafael Ávila de Espíndola-12/+14
2011-07-06Generate a main fn for test running. Issue #428Brian Anderson-1/+1
2011-07-06rustc: Make meta items into interior vectorsPatrick Walton-11/+10
2011-07-06Begin adding unit testing infrastructure to the compilerBrian Anderson-4/+12
Add a --test flag and a pass for transforming the AST to generate a test harness. Issue #428
2011-07-06Remove temporary stdlib placeholders, use actual stdlib functionsMarijn Haverbeke-1/+1
(Possible now that a snapshot took place.)
2011-07-05Change ast::meta_name_value to accept any literal, not just stringBrian Anderson-1/+1
This isn't useful for much of anything yet, since metadata::encoder doesn't know how to handle the non-string variants. Issue #611
2011-07-05Don't thread the local crate number through the sessionMarijn Haverbeke-7/+2
It's a constant, anyway.
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-71/+46
src/comp/syntax is currently just a sub-module of rustc, but it will, in the near future, be its own crate. This includes: - The AST data structure - The parser - The pretty-printer - Visit, walk, and fold - The syntax extension system - Some utility stuff that should be in the stdlib* *) Stdlib extensions currently require a snapshot before they can be used, and the win build is very broken right now. This is temporary and will be cleaned up when one of those problems goes away. A lot of code was moved by this patch, mostly towards a more organized layout. Some package paths did get longer, and I guess the new layout will take some getting used to. Sorry about that! Please try not to re-introduce any dependencies in syntax/ on any of the other src/comp/ subdirs.
2011-07-05Move pretty-printing 'modes' into a callback hookMarijn Haverbeke-6/+53
This way, the pretty-printer does not have to know about middle::ty. (This is a preparation for separating the AST functionality into a separate crate.)
2011-07-04Use metadata to avoid always passing -Lrustllvm to the linker.Rafael Ávila de Espíndola-8/+17
2011-07-04Simplify the code a bit.Rafael Ávila de Espíndola-8/+3
2011-07-01Introduce --cfg argument for providing additional configuration. Issue #489Brian Anderson-4/+27
2011-07-01Remove the environment concept from front::evalBrian Anderson-16/+20
This is the old method of conditional compilation. It is going away. Issue #489
2011-06-30Add a pass to fold out items that do not belong in the current configurationBrian Anderson-0/+2
The parser needs to parse unconfigured items into the AST so that they can make the round trip back through the pretty printer, but subsequent passes shouldn't care about items not being translated. Running a fold pass after parsing is the lowest-impact way to make this work. The performance seems fine. Issue #489
2011-06-30Second try to remove -lssp.Rafael Ávila de Espíndola-5/+2
2011-06-29Be more strategic about linking to rust cratesBrian Anderson-1/+26
Instead of linking directly to the rust crate, try to figure out the location and name of the library from the file name, then call gcc with appropriate -L, -l flags. This will allow dynamic linking to be more forgiving about where it loads the library from at runtime - currently a stage3 compiler can't run correctly from the stage0 directory. Only tested on Linux. Fingers crossed.
2011-06-29Display an error when linking failsBrian Anderson-2/+13
2011-06-29Add session.note methodBrian Anderson-0/+3
2011-06-29session.err shouldn't take a spanBrian Anderson-2/+2
2011-06-29Eliminate the --check-claims compiler flagTim Chevalier-6/+2
The option can only be toggled at runtime now.
2011-06-29Revert ""Try" push without -lssp on windows to see what needs it."Rafael Ávila de Espíndola-1/+1
This reverts commit 47b3e087e945a2a8fcfd1179e333746d294c1259.
2011-06-29"Try" push without -lssp on windows to see what needs it.Rafael Ávila de Espíndola-1/+1
2011-06-28Implement "claim"Tim Chevalier-2/+6
Implement "claim" (issue #14), which is a version of "check" that doesn't really do the check at runtime. It's an unsafe feature. The new flag --check-claims turns claims into checks automatically -- but it's off by default, so by default, the assertion in a claim doesn't execute at runtime.
2011-06-28Move glue.o to stageN/lib.Rafael Ávila de Espíndola-1/+1
2011-06-28Use "" in the native_name as an indication that no extra options have toRafael Ávila de Espíndola-0/+3
be passed to the "linker". Use that for libc.
2011-06-27Rename middle::metadata to metadata::cwriter. Move creader to metadataBrian Anderson-2/+2
Preparation for a lot more metadata refactoring
2011-06-27Record and link with used native libraries.Rafael Ávila de Espíndola-3/+24
2011-06-20Merge remote branch 'upstream/master'Rafael Ávila de Espíndola-10/+11
2011-06-20Fix line length.Rafael Ávila de Espíndola-2/+2
2011-06-20Make trans use the new ast_map instead of building its ownMarijn Haverbeke-2/+2
2011-06-20Use ast_map in typeck, instead of building another indexMarijn Haverbeke-2/+2
2011-06-20Add a separate AST mapping phaseMarijn Haverbeke-2/+5
This will replace the various node_id-to-node mappings done in several other passes. This commit already uses the new map in resolve, dropping the ast_map that was built there before.
2011-06-20Get rid of def_ids and anns in AST nodes, use single node_idMarijn Haverbeke-4/+2
This reduces some redundancy in the AST data structures and cruft in the code that works with them. To get a def_id from a node_id, apply ast::local_def, which adds the local crate_num to the given node_id. Most code only deals with crate-local node_ids, and won't have to create def_ids at all.
2011-06-20Remember the library files we used in rustc and pass them to the "linker".Rafael Ávila de Espíndola-2/+19
This avoid the hardcoded -lstd, allows programs to use other crates and avoids any differences that may exist in the rustc and ld search logic.
2011-06-20Remove flags that are not used during linking.Rafael Ávila de Espíndola-5/+4
2011-06-19rustc: Re-introduce session.span_err, session.errBrian Anderson-2/+16
These errors are non-fatal. The session.abort_if_errors function needs to be called at strategic points to convert the previous errors to utter failure. Issue #440