Skip to content

Add builtin Sized kind and a few basic tests #6852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 461 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
461 commits
Select commit Hold shift + click to select a range
1df8a54
testsuite: Add xfailed test cases
catamorphism May 21, 2013
8c68c4a
rustc: Don't generate code for unreachable expressions
catamorphism May 21, 2013
02c59bc
auto merge of #6662 : catamorphism/rust/issue-4780, r=catamorphism
bors May 21, 2013
799f281
auto merge of #6664 : catamorphism/rust/issue-3796, r=catamorphism
bors May 21, 2013
15e4438
auto merge of #6665 : catamorphism/rust/issue-5741, r=nikomatsakis
bors May 21, 2013
499b022
fix arm stack alignment
crabtw May 21, 2013
f8af2b5
fix issue #6209
yjh0502 May 21, 2013
8a4bffc
auto merge of #6667 : crabtw/rust/arm-rt, r=brson
bors May 22, 2013
da94580
"Type :help for help", similar to ghci
May 22, 2013
6c33f50
Fix #6342
yjh0502 May 22, 2013
b6a0d40
auto merge of #6671 : kud1ing/rust/patch-1, r=z0w0
bors May 22, 2013
06685ba
add smallintset
yjh0502 May 22, 2013
5a42481
declare that "///" is still a doc comment, just not "////+" (fixes #5…
ben0x539 May 22, 2013
e643396
Implement static_assert attribute
emberian May 22, 2013
acf920f
Add static_assert doc blurb
emberian May 22, 2013
3d82a0a
auto merge of #6670 : cmr/rust/static_assert, r=graydon
bors May 22, 2013
4bbbae6
auto merge of #6672 : yjh0502/rust/fix_6342, r=graydon
bors May 22, 2013
fd94bd9
testsuite: Add passing test for #4107
catamorphism May 14, 2013
1aae163
testsuite: Make main fn public
catamorphism May 22, 2013
b17b3f9
auto merge of #6483 : catamorphism/rust/issue-4107, r=catamorphism
bors May 22, 2013
ee1b419
revert no-longer-required workaround for mystery bug, close #3396
graydon May 22, 2013
7ccc97e
Fix ICE in macros
emberian May 22, 2013
5118d2f
Add test
emberian May 22, 2013
f517ed0
auto merge of #6686 : cmr/rust/fix-6596, r=catamorphism
bors May 22, 2013
1d3e84c
auto merge of #6669 : yjh0502/rust/fix_6209, r=graydon
bors May 23, 2013
2915187
auto merge of #6677 : yjh0502/rust/smallintset, r=graydon
bors May 23, 2013
ca9bb2d
librustc: Disallow `use` from reaching into impls or traits.
pcwalton May 13, 2013
08e561a
librustc: Disable borrow check debugging even when rustc is compiled …
pcwalton May 15, 2013
db518ef
test: Fix tests.
pcwalton May 15, 2013
211d038
librustc: Make `~Trait` two words by storing the type descriptor in t…
pcwalton May 16, 2013
565942b
librustc: Fix privacy checking for cross-crate variants
pcwalton May 16, 2013
0c820d4
libstd: Rename libcore to libstd and libstd to libextra; update makef…
pcwalton May 17, 2013
ebfc2b8
librustc: Rename core injection to std injection
pcwalton May 17, 2013
f3723cf
libextra: Rename the actual metadata names of libcore to libstd and l…
pcwalton May 17, 2013
c532e03
librustc: Change `std` to `extra` throughout libsyntax and librustc
pcwalton May 18, 2013
d5055f4
librustc: Make `std_inject` inject the name `std`, not `core`
pcwalton May 18, 2013
b8be7e8
libfuzzer: Rename `std` to `extra`.
pcwalton May 19, 2013
14be4c2
librustdoc: Rename `std` to `extra`.
pcwalton May 19, 2013
9200237
fuzzer: Change `core` to `std` in the fuzzer
pcwalton May 20, 2013
c10e0cb
syntax: Change syntax extensions to expand to `std::foo` instead of `…
pcwalton May 20, 2013
1be40be
test: Update tests to use the new syntax.
pcwalton May 21, 2013
ee52865
test: Update tests and import the prelude in some more places.
pcwalton May 22, 2013
18df18c
libstd: Fix merge fallout.
pcwalton May 22, 2013
3a66d73
libsyntax: Fix more merge fallout.
pcwalton May 22, 2013
a5ca58a
libextra: Allow unnecessary allocations
pcwalton May 23, 2013
18fca3e
librustc: Add some missing `use core::prelude::*;` in the test cases
pcwalton May 23, 2013
be01109
etc: Fix test combiner for core->std/std->extra change. rs=burningtree
pcwalton May 23, 2013
6e2b082
libextra: Add missing core::prelude import. rs=burningtree
pcwalton May 23, 2013
34cfd21
more testing fallout from core->std/std->extra move
tedhorst May 23, 2013
d213443
rustc: Check for null before dropping ~objects. #5192
brson May 23, 2013
d49d0f8
auto merge of #6704 : tedhorst/rust/rename_lib_fixes, r=graydon
bors May 23, 2013
7f642f3
rustc: Give glue symbols meaningful names
brson May 23, 2013
4bbc13d
auto merge of #6705 : brson/rust/issue-5192, r=catamorphism
bors May 24, 2013
1965d72
core: remove iter_bytes helper functions
erickt May 23, 2013
dc970c1
cleanup warnings from libstd
erickt May 23, 2013
609a9e6
cleanup warnings from libextra
erickt May 23, 2013
a4df35f
cleanup warnings from libsyntax
erickt May 23, 2013
9635b30
cleanup warnings from librustc
erickt May 23, 2013
50f6198
cleanup warnings from librusti
erickt May 23, 2013
d7e43aa
cleanup warnings from librustdoc
erickt May 23, 2013
88a1219
cleanup warnings from compiletest
erickt May 23, 2013
21c3cf0
cleanup warnings from librustpkg
erickt May 24, 2013
cc4fabc
Fix some std/extra language in the tutorial
erickt May 24, 2013
a776d65
auto merge of #6690 : erickt/rust/cleanup-warnings, r=brson
bors May 24, 2013
5ba5865
swap_ptr: rm equality check
thestinger May 24, 2013
7d2f836
add memcpy intrinsic to mirror memmove
thestinger May 24, 2013
a7f450a
indentation fix
thestinger May 24, 2013
abb2823
make arm register definition consistent with rt
crabtw May 22, 2013
7bff028
optimize util::swap, &mut pointers never alias
thestinger May 24, 2013
248a669
docs: Don't mention obsolete move operator, as per #5700
catamorphism May 24, 2013
7c0cc9c
auto merge of #6684 : crabtw/rust/arm, r=ILyoan
bors May 24, 2013
212d6a2
auto merge of #6710 : thestinger/rust/swap, r=catamorphism
bors May 24, 2013
0629ef1
use deriving for DeepClone
thestinger May 24, 2013
ed9a793
auto merge of #6706 : brson/rust/glue, r=catamorphism
bors May 24, 2013
e69e809
Define _RUST_STAGEN when building rustrt.
thomaslee May 24, 2013
5787bf3
auto merge of #6711 : catamorphism/rust/issue-5700, r=thestinger
bors May 24, 2013
c658132
Warnings for missing documentations.
Xazax-hun May 24, 2013
2f69bb9
auto merge of #6712 : thestinger/rust/derive, r=catamorphism
bors May 24, 2013
3d61931
Only trigger missing documentation warnings to public functions and f…
Xazax-hun May 24, 2013
b5ab101
auto merge of #6680 : ben0x539/rust/slashslashslash, r=graydon
bors May 24, 2013
1009c21
show options for -W help and -W
May 24, 2013
ec8fb88
Remove usage of the #[merge] hack with int modules
alexcrichton May 13, 2013
03ae629
Remove the #[merge] hack from the parser
alexcrichton May 20, 2013
9a40c5c
auto merge of #6714 : thomaslee/rust/rustrt-stage, r=brson
bors May 24, 2013
264c84b
Make rust {test, run} exit with appropriate code.
hjr3 May 24, 2013
f212543
Remove the get function
May 24, 2013
ff28bb7
Remove the clone function for the method
May 24, 2013
ac6c15a
Actually filter view_items in blocks
alexcrichton May 24, 2013
5f90f1c
auto merge of #6723 : osaut/rust/arc-remove-get, r=brson
bors May 25, 2013
876ce10
Update the linenoise library
alexcrichton May 24, 2013
af27e17
Set the USE_UTF8 flag for linenoise to handle utf8-input
alexcrichton May 24, 2013
0628c92
auto merge of #6726 : alexcrichton/rust/filter-blocks, r=z0w0
bors May 25, 2013
d930b2c
auto merge of #6730 : hjr3/rust/exit_code, r=z0w0
bors May 25, 2013
bf4d372
Fix compilation errors with linenoise
alexcrichton May 25, 2013
5233604
Add basic atomic types
May 25, 2013
b238a08
auto merge of #6728 : alexcrichton/rust/update-linenoise, r=Aatch
bors May 25, 2013
257192c
Ignore the generated docs for libextra
huonw May 25, 2013
6e65a3f
auto merge of #6734 : huonw/rust/gitignore, r=thestinger
bors May 25, 2013
6c62d77
Use an enum for keywords and intern them to improve parser performance
dotdash May 25, 2013
9d37d03
auto merge of #6737 : dotdash/rust/static_keywords, r=pcwalton
bors May 25, 2013
2706271
auto merge of #6732 : Aatch/rust/atomic-types, r=brson
bors May 25, 2013
e2f8b51
auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=b…
bors May 25, 2013
bf57d65
Issue #6419: Better clang version detection for Apple Clang
lilyball May 25, 2013
008e6e5
Make AtomicPtr use *mut, instead of ~
May 25, 2013
30b471b
Add AtomicOption type
May 26, 2013
df1814b
Add some documentation
May 26, 2013
cf34f9f
librustc: Allow intra-crate start functions, for runtimeless operation.
pcwalton May 26, 2013
196851c
core: Fail with a better error message when list_dir gets an empty path
catamorphism May 22, 2013
a243ea3
testsuite: Add a test for listing the root directory...
catamorphism May 23, 2013
510d0f2
auto merge of #6687 : catamorphism/rust/list_dir_empty, r=catamorphism
bors May 26, 2013
2c2346e
Mark &mut parameters as noalias
May 26, 2013
d89a6ce
rustdoc: properly nest markup within enum variant lists (fixes #6605)
ben0x539 May 23, 2013
f254d11
auto merge of #6742 : Aatch/rust/mut-noalias, r=thestinger
bors May 26, 2013
cf8e9f9
make the memcpy/memmove intrinsics higher-level
thestinger May 24, 2013
2eaa5db
C++0x -> C++11
thestinger May 24, 2013
d9c0f0f
add memset32/memset64
thestinger May 24, 2013
f6023a0
use uninit for cast::transmute_copy
thestinger May 25, 2013
58d6864
add an align parameter to call_memcpy
thestinger May 25, 2013
b25c520
make transmute_copy use memcpy, and inline it
thestinger May 25, 2013
1484661
inline bump_box_refcount
thestinger May 25, 2013
9bb8077
Add documentation for libstd/bool.rs.
steveklabnik May 26, 2013
1f8c4b0
auto merge of #6700 : ben0x539/rust/nestvariantdocs, r=thestinger
bors May 26, 2013
dea6677
Add a short section on ARC
May 26, 2013
f5d4ea8
auto merge of #6748 : steveklabnik/rust/bool_docs, r=thestinger
bors May 26, 2013
c302010
mark unique pointer parameters as noalias
thestinger May 26, 2013
998cbbd
update ctags define
ILyoan May 27, 2013
fa67e09
auto merge of #6719 : kud1ing/rust/rustc_w, r=bstrie
bors May 27, 2013
a6b05b3
auto merge of #6761 : ILyoan/rust/ctags, r=thestinger
bors May 27, 2013
d577eaf
auto merge of #6688 : graydon/rust/issue-3396-mystery-bug-in-metadata…
bors May 27, 2013
76c3121
Refactor core::run in order to address many of the issues
May 12, 2013
49a1ab8
Make test_change_working_directory change the current
May 14, 2013
04a3935
Rename unwrap_input/unwrap_output as suggested by
May 14, 2013
b7294e1
auto merge of #6433 : Dretch/rust/run-refactor, r=thestinger
bors May 27, 2013
e2fcb92
Fix docs to use std instead of core.
steveklabnik May 27, 2013
3941f78
auto merge of #6763 : steveklabnik/rust/core_to_std, r=thestinger
bors May 27, 2013
3794605
Use passing by-value in gmtime, mktime
fdr May 27, 2013
c6f3577
Increment copyright year of time.rs
fdr May 27, 2013
beec6e4
Get rid of no-longer-needed #[doc(hidden)] attributes.
lkuper May 27, 2013
363e672
Use adjustments table for allocation lint
sanxiyn May 23, 2013
8f80323
Remove unnecessary allocations flagged by lint
sanxiyn May 23, 2013
d98cc99
auto merge of #6768 : lkuper/rust/3538, r=thestinger
bors May 27, 2013
0d5fdce
syntax highlight code examples in docstrings
thestinger May 27, 2013
77de84b
extra: Add reserve and reserve_at_least to extra::deque
catamorphism May 27, 2013
c9c4d92
Add xfail'd test for #6762.
lkuper May 27, 2013
b0f3686
auto merge of #6703 : sanxiyn/rust/allocation-lint, r=sanxiyn
bors May 27, 2013
5d04ee8
auto merge of #6715 : Xazax-hun/rust/incoming, r=graydon
bors May 27, 2013
32c6199
Change `alt` to `match` in filenames.
lkuper May 27, 2013
e6c04de
fix casts on 32-bit
thestinger May 27, 2013
dbc5758
auto merge of #6724 : thestinger/rust/swap_fast, r=thestinger
bors May 27, 2013
e6a838d
auto merge of #6739 : kballard/rust/issue-6419, r=catamorphism
bors May 27, 2013
67283ea
Omit unused implicit argument if return type is immediate.
thomaslee May 22, 2013
cddd274
Add _RUST_STAGE0 #ifdefs
thomaslee May 25, 2013
a85993f
Added _RUST_STAGEN guard to rust_call_tydesc_glue
thomaslee May 25, 2013
6c03fbf
testsuite: Add passing test for #4735
catamorphism May 24, 2013
58547d6
testsuite: Add working test for #5550
catamorphism May 24, 2013
403aee1
testsuite: Test cases, one xfailed, one not
catamorphism May 24, 2013
351f603
testsuite: Update core to std
catamorphism May 28, 2013
2061ce9
auto merge of #6741 : pcwalton/rust/intra-crate-start, r=graydon
bors May 28, 2013
56a2e5d
core::vec is missing methods for mutable slices
june0cho May 27, 2013
b7f71e1
Implementing suggestions from @nikomatsakis
thomaslee May 28, 2013
3c4ce79
rustc: Switch ty::node_type_table to smallintmap, cut 400mb memory us…
graydon May 28, 2013
ae7df57
Prevent refcount cycles during linting
alexcrichton May 28, 2013
6d7d759
auto merge of #6752 : osaut/rust/tutorial-tasks, r=graydon
bors May 28, 2013
4521c34
Fix #6696
yjh0502 May 28, 2013
26fb16e
auto merge of #6776 : graydon/rust/node-type-table-hashmap, r=thestinger
bors May 28, 2013
6264df5
auto merge of #6777 : alexcrichton/rust/less-memory, r=graydon
bors May 28, 2013
f7f36a8
auto merge of #6766 : fdr/rust/time-by-value, r=catamorphism
bors May 28, 2013
fe7f528
auto merge of #6769 : catamorphism/rust/issue-4994, r=thestinger
bors May 28, 2013
7ee329e
auto merge of #6770 : lkuper/rust/6762, r=catamorphism
bors May 28, 2013
b738b57
auto merge of #6754 : thestinger/rust/noalias, r=nikomatsakis
bors May 28, 2013
24784e8
auto merge of #6771 : thestinger/rust/highlight, r=luqmana
bors May 28, 2013
c33258b
auto merge of #6773 : lkuper/rust/alt-to-match, r=thestinger
bors May 28, 2013
2505416
Remove colorcolumn setting
hoelzro May 28, 2013
05735a9
auto merge of #6783 : hoelzro/rust/master, r=bstrie
bors May 28, 2013
8749cb5
Fix 'make check-stage1-std' by correcting dependencies
alexcrichton May 27, 2013
accc527
`noalias` on all `&mut` parameters is too coarse
thestinger May 28, 2013
833ed21
auto merge of #6786 : thestinger/rust/revert-noalias-mut-rptr, r=niko…
bors May 28, 2013
c49e41c
compiletest: Add #[no_core] to fix check-stage1.
luqmana May 28, 2013
b04c40b
Silence various warnings throughout test modules
alexcrichton May 27, 2013
d7e1f08
auto merge of #6774 : alexcrichton/rust/silence-warnings, r=graydon
bors May 28, 2013
7ad1cc7
testsuite: Add main function to issue-5554 test
catamorphism May 28, 2013
9a06ff0
auto merge of #6707 : catamorphism/rust/issue-5543, r=catamorphism
bors May 28, 2013
b4a3fe2
librustc: drop AST before running LLVM, frees 400mb on a librustc build
graydon May 28, 2013
9ab2921
use the type's alignment for generated memsets
thestinger May 28, 2013
5676056
auto merge of #6775 : yjh0502/rust/issue_6696, r=catamorphism
bors May 28, 2013
5851d32
Move checking for moves and initialization of local variables and pat…
nikomatsakis May 22, 2013
329f7a1
Update docs on the formal basis of the borrow checker.
nikomatsakis May 26, 2013
bf1647c
Reconcile docs and code, adding examples and adding RESTR_CLAIM
nikomatsakis May 26, 2013
e35db1a
Reconcile treatment of &mut with the docs
nikomatsakis May 27, 2013
f30b538
Update documentation for moves
nikomatsakis May 28, 2013
e3d0c1e
auto merge of #6731 : thomaslee/rust/issue-6575, r=pcwalton
bors May 29, 2013
c8c60f0
auto merge of #6740 : Aatch/rust/atomic-types, r=brson
bors May 29, 2013
b1e7d49
Generalized implementation of FromBase64
sfackler May 29, 2013
d694e28
Refactor optimization pass handling.
Aatch May 27, 2013
a5b87d7
Fix pass creation typo
Aatch May 28, 2013
4988c89
Move the initial dead prototype removal pass
Aatch May 28, 2013
998e2ce
Remove passes that were causing bad optmizations
Aatch May 29, 2013
6861d54
Remove now-unused import
Aatch May 29, 2013
ff86830
Define rustc's host triple at compile time
alexcrichton May 25, 2013
ba33472
Un-ignore rusti/rustpkg tests on i686
alexcrichton May 25, 2013
e0d6486
auto merge of #6780 : june0cho/rust/issue5984, r=brson
bors May 29, 2013
4ad0b8a
Remove extraneous defs from export file
Aatch May 29, 2013
e946b4f
auto merge of #6778 : Aatch/rust/pass-refactor, r=graydon
bors May 29, 2013
d80642b
auto merge of #6784 : nikomatsakis/rust/moves-into-borrowck, r=pcwalton
bors May 29, 2013
14d59af
Fix vec::mut_slice
june0cho May 29, 2013
149960e
auto merge of #6789 : luqmana/rust/compiletest-fix, r=thestinger
bors May 29, 2013
e3e55c5
auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch
bors May 29, 2013
faf1afe
Further refactor optimization pass handling
Aatch May 29, 2013
844b5cf
auto merge of #6794 : thestinger/rust/align_zero, r=pcwalton
bors May 29, 2013
a037fa4
auto merge of #6796 : sfackler/rust/FromBase64-type-fix, r=bstrie
bors May 29, 2013
6cc9a26
Replaced calls to external fmin/fmax by a Rust implementation.
Thiez May 29, 2013
562069c
auto merge of #6800 : june0cho/rust/issue5984, r=pcwalton
bors May 29, 2013
3141acf
Changed to a more efficient implementation.
Thiez May 29, 2013
d295709
auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
bors May 29, 2013
35655a0
auto merge of #6803 : Thiez/rust/native_fmax_fmin, r=brson
bors May 29, 2013
2b08337
Fix #6805: add --enable-ccache configure option to prefix compiler in…
pnkfelix May 29, 2013
bd30285
auto merge of #6813 : pnkfelix/rust/fsk-issue-6805-ccache-support, r=…
bors May 29, 2013
b5da389
auto merge of #6799 : Aatch/rust/pass-refactor, r=graydon
bors May 29, 2013
aeda178
librustc: Redo the unsafe checker and make unsafe methods not callabl…
pcwalton May 24, 2013
481d4ca
libsyntax: Make `drop` no longer a keyword
pcwalton May 24, 2013
4e3d4b3
libsyntax: Stop parsing mutable fields
pcwalton May 24, 2013
206ab89
librustc: Stop reexporting the standard modules from prelude.
pcwalton May 25, 2013
b916e65
librustc: add some imports to back/passes.rs rs=burningtree
erickt May 30, 2013
5fa7884
test: Fix problem with check-fast. rs=burningtree
pcwalton May 30, 2013
bfe141c
Fixes #6824 - Correct scan_number() grammar
May 30, 2013
e67bfab
etc: Fix more check-fast breakage. rs=burningtree
pcwalton May 30, 2013
3a3bf8b
Remove all of the `#[inline(always)]` attributes from bigint
Aatch May 30, 2013
31b2804
auto merge of #6825 : caitp/rust/issue-6824, r=Aatch
bors May 30, 2013
af995ce
Make missing documentation linting more robust
alexcrichton May 28, 2013
4a5d887
Allow doc(hidden) and --test to disable doc linting
alexcrichton May 28, 2013
007651c
Require documentation by default for libstd
alexcrichton May 28, 2013
3956850
libextra: Require documentation by default
alexcrichton May 29, 2013
ca74cbd
auto merge of #6798 : alexcrichton/rust/doc-lints, r=pcwalton
bors May 30, 2013
1720d9f
Remove a bunch of unnecessary allocations and copies
dotdash May 29, 2013
682afca
auto merge of #6829 : dotdash/rust/allocs, r=sanxiyn
bors May 30, 2013
e583d5a
Minor documentation addition.
Xazax-hun May 30, 2013
9fd18a9
Minor style fix.
Xazax-hun May 30, 2013
0d9ea4e
Minor grammar fix.
Xazax-hun May 30, 2013
7f410b3
Attempt to get reuse of common code from multiple clones in different…
pnkfelix May 30, 2013
594f40e
bump clang version
emberian May 30, 2013
a394298
auto merge of #6831 : Xazax-hun/rust/incoming, r=graydon
bors May 30, 2013
784a849
auto merge of #6835 : cmr/rust/clang, r=thestinger
bors May 30, 2013
2bed5dc
rustc: change 'use' to 'add' in error message, fix #2994
graydon May 8, 2013
9bfe296
auto merge of #6836 : pnkfelix/rust/fsk-issue6805-ccache-rewrite-base…
bors May 30, 2013
858ca2e
fix the check-stageN-doc-$doc targets, close #5661
graydon May 22, 2013
308774e
auto merge of #6340 : graydon/rust/issue-2994, r=graydon
bors May 30, 2013
237dce1
auto merge of #6689 : graydon/rust/issue-5661-doc-test-targets, r=gra…
bors May 31, 2013
b8a53b5
Add 'Sized' builtin kind; doesn't do anything yet
bblum May 31, 2013
32cd9b3
Highlight Sized in vim and kate
bblum May 31, 2013
5113f68
Add simple tests for Sized
bblum May 31, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ src/.DS_Store
/doc/html
/doc/latex
/doc/std
/doc/extra
/nd/
/llvm/
version.md
Expand All @@ -81,7 +82,6 @@ keywords.md
x86_64-apple-darwin/
x86_64-unknown-linux-gnu/
i686-unknown-linux-gnu/
doc/core/
tmp.*.rs
config.stamp
.DS_Store
Expand Down
56 changes: 30 additions & 26 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ endif
ifdef TRACE
CFG_RUSTC_FLAGS += -Z trace
endif
ifndef DEBUG_BORROWS
RUSTFLAGS_STAGE1 += -Z no-debug-borrows
RUSTFLAGS_STAGE2 += -Z no-debug-borrows
endif

# platform-specific auto-configuration
include $(CFG_SRC_DIR)mk/platform.mk
Expand Down Expand Up @@ -201,8 +205,8 @@ define DEF_LIBS

CFG_RUNTIME_$(1) :=$(call CFG_LIB_NAME_$(1),rustrt)
CFG_RUSTLLVM_$(1) :=$(call CFG_LIB_NAME_$(1),rustllvm)
CFG_CORELIB_$(1) :=$(call CFG_LIB_NAME_$(1),core)
CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std)
CFG_EXTRALIB_$(1) :=$(call CFG_LIB_NAME_$(1),extra)
CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc)
CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
CFG_LIBFUZZER_$(1) :=$(call CFG_LIB_NAME_$(1),fuzzer)
Expand All @@ -211,17 +215,17 @@ CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust)

EXTRALIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),extra)
STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std)
CORELIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),core)
LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc)
LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
LIBFUZZER_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),fuzzer)
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust)
EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra)
STDLIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),std)
CORELIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),core)
LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
LIBFUZZER_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),fuzzer)
Expand All @@ -236,19 +240,19 @@ $(foreach target,$(CFG_TARGET_TRIPLES),\
$(eval $(call DEF_LIBS,$(target))))

######################################################################
# Core library variables
# Standard library variables
######################################################################

CORELIB_CRATE := $(S)src/libcore/core.rc
CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \
STDLIB_CRATE := $(S)src/libstd/core.rc
STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
core.rc *.rs */*.rs */*/*rs */*/*/*rs))

######################################################################
# Standard library variables
# Extra library variables
######################################################################

STDLIB_CRATE := $(S)src/libstd/std.rc
STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
EXTRALIB_CRATE := $(S)src/libextra/std.rc
EXTRALIB_INPUTS := $(wildcard $(addprefix $(S)src/libextra/, \
std.rc *.rs */*.rs))

######################################################################
Expand All @@ -271,7 +275,7 @@ DRIVER_CRATE := $(S)src/driver/driver.rs

# FIXME: x86-ism
LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser jit mcjit \
interpreter
interpreter instrumentation

define DEF_LLVM_VARS
# The configure script defines these variables with the target triples
Expand Down Expand Up @@ -340,33 +344,33 @@ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustc/$(2)
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/$$(CFG_LIBDIR)

# The name of the core and standard libraries used by rustc
# The name of the standard and extra libraries used by rustc
ifdef CFG_DISABLE_SHAREDSTD
HCORELIB_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/libcore.rlib
TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/libcore.rlib

HSTDLIB_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/libstd.rlib
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib

HEXTRALIB_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/libextra.rlib
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/libextra.rlib

HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/librustc.rlib
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/librustc.rlib
else
HCORELIB_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/$(CFG_CORELIB_$(3))
TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2))

HSTDLIB_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/$(CFG_STDLIB_$(3))
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))

HEXTRALIB_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/$(CFG_EXTRALIB_$(3))
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC_$(3))
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
Expand All @@ -378,8 +382,8 @@ HSREQ$(1)_H_$(3) = \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
$$(HLIB$(1)_H_$(3))/$(CFG_RUNTIME_$(3)) \
$$(HLIB$(1)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
$$(HEXTRALIB_DEFAULT$(1)_H_$(3)) \
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
$$(MKFILE_DEPS)
Expand All @@ -393,8 +397,8 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
# Prerequisites for a working stageN compiler and libraries, for a specific target
SREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

# Prerequisites for a working stageN compiler and libraries, for a specific target
CSREQ$(1)_T_$(2)_H_$(3) = \
Expand All @@ -409,8 +413,8 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(2)) \
Expand Down
70 changes: 58 additions & 12 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
opt manage-submodules 1 "let the build manage the git submodules"
opt mingw-cross 0 "cross-compile for win32 using mingw"
opt clang 0 "prefer clang to gcc for building the runtime"
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
valopt prefix "/usr/local" "set installation prefix"
Expand Down Expand Up @@ -421,6 +422,7 @@ else
fi

probe CFG_CLANG clang++
probe CFG_CCACHE ccache
probe CFG_GCC gcc
probe CFG_LD ld
probe CFG_VALGRIND valgrind
Expand Down Expand Up @@ -555,11 +557,11 @@ then
CFG_CLANG_VERSION=$("$CFG_CLANG" \
--version \
| grep version \
| sed 's/.*\(version .*\)/\1/' \
| sed 's/.*\(version .*\)/\1/; s/.*based on \(LLVM .*\))/\1/' \
| cut -d ' ' -f 2)

case $CFG_CLANG_VERSION in
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 4.0* | 4.1* | 4.2*)
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* )
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
CFG_C_COMPILER="clang"
;;
Expand All @@ -571,6 +573,16 @@ else
CFG_C_COMPILER="gcc"
fi

if [ ! -z "$CFG_ENABLE_CCACHE" ]
then
if [ -z "$CFG_CCACHE" ]
then
err "ccache requested but not found"
fi

CFG_C_COMPILER="ccache $CFG_C_COMPILER"
fi

# a little post-processing of various config values

CFG_PREFIX=${CFG_PREFIX%/}
Expand Down Expand Up @@ -643,7 +655,7 @@ fi
step_msg "making directories"

for i in \
doc doc/core doc/std \
doc doc/std doc/extra \
dl tmp
do
make_dir $i
Expand All @@ -665,12 +677,16 @@ make_dir rt
for t in $CFG_TARGET_TRIPLES
do
make_dir rt/$t
for i in \
isaac linenoise sync test \
arch/i386 arch/x86_64 arch/arm arch/mips \
libuv libuv/src/ares libuv/src/eio libuv/src/ev
for s in 0 1 2 3
do
make_dir rt/$t/$i
make_dir rt/$t/stage$s
for i in \
isaac linenoise sync test \
arch/i386 arch/x86_64 arch/arm arch/mips \
libuv libuv/src/ares libuv/src/eio libuv/src/ev
do
make_dir rt/$t/stage$s/$i
done
done
done

Expand Down Expand Up @@ -821,20 +837,35 @@ do
--enable-bindings=none --disable-threads \
--disable-pthreads"

if [ "$CFG_C_COMPILER" = "clang" ]
then
case "$CFG_C_COMPILER" in
("ccache clang")
LLVM_CXX_32="ccache clang++ -m32 -Qunused-arguments"
LLVM_CC_32="ccache clang -m32 -Qunused-arguments"

LLVM_CXX_64="ccache clang++ -Qunused-arguments"
LLVM_CC_64="ccache clang -Qunused-arguments"
;;
("clang")
LLVM_CXX_32="clang++ -m32"
LLVM_CC_32="clang -m32"

LLVM_CXX_64="clang++"
LLVM_CC_64="clang"
else
;;
("ccache gcc")
LLVM_CXX_32="ccache g++ -m32"
LLVM_CC_32="ccache gcc -m32"

LLVM_CXX_64="ccache g++"
LLVM_CC_64="ccache gcc"
;;
("gcc")
LLVM_CXX_32="g++ -m32"
LLVM_CC_32="gcc -m32"

LLVM_CXX_64="g++"
LLVM_CC_64="gcc"
fi
esac

LLVM_CFLAGS_32="-m32"
LLVM_CXXFLAGS_32="-m32"
Expand Down Expand Up @@ -931,6 +962,21 @@ then
putvar CFG_PAXCTL
fi

# Avoid spurious warnings from clang by feeding it original source on
# ccache-miss rather than preprocessed input.
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_ENABLE_CLANG" ]
then
CFG_CCACHE_CPP2=1
putvar CFG_CCACHE_CPP2
fi

if [ ! -z "$CFG_ENABLE_CCACHE" ]
then
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
putvar CFG_CCACHE_BASEDIR
fi


if [ ! -z $BAD_PANDOC ]
then
CFG_PANDOC=
Expand Down
Loading