Skip to content

Commit 9171acb

Browse files
committed
---
yaml --- r: 151311 b: refs/heads/try2 c: fd625dd h: refs/heads/master i: 151309: 3a00d93 151307: 079e0c7 151303: 4815d78 151295: 66464db v: v3
1 parent 45a441b commit 9171acb

File tree

1,316 files changed

+36796
-18300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,316 files changed

+36796
-18300
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 7fefc1c7f417a8445da85e57a9523508a2561ef3
8+
refs/heads/try2: fd625dda9a25c054d622e20822f2889f17b15aa6
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/LICENSE-MIT

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Copyright (c) 2006-2009 Graydon Hoare
2-
Copyright (c) 2009-2014 Mozilla Foundation
1+
Copyright (c) 2014 The Rust Project Developers
32

43
Permission is hereby granted, free of charge, to any
54
person obtaining a copy of this software and associated

branches/try2/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ documentation.
2020
## Building from Source
2121

2222
1. Make sure you have installed the dependencies:
23-
* `g++` 4.4 or `clang++` 3.x
23+
* `g++` 4.7 or `clang++` 3.x
2424
* `python` 2.6 or later (but not 3.x)
2525
* `perl` 5.0 or later
2626
* GNU `make` 3.81 or later
2727
* `curl`
28+
* `git`
2829
2. Download and build Rust:
2930

3031
You can either download a [tarball] or build directly from the [repo].

branches/try2/RELEASES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Version 0.10 (April 2014)
6363
documentation index page.
6464
* std: `std::condition` has been removed. All I/O errors are now propagated
6565
through the `Result` type. In order to assist with error handling, a
66-
`try!` macro for unwrapping errors with an early return and an lint for
66+
`try!` macro for unwrapping errors with an early return and a lint for
6767
unused results has been added. See #12039 for more information.
6868
* std: The `vec` module has been renamed to `slice`.
6969
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.

branches/try2/configure

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
388388
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
389389
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
390390
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
391+
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
391392
opt rpath 1 "build rpaths into rustc itself"
392393
opt nightly 0 "build nightly packages"
393394
opt verify-install 1 "verify installed binaries work"
@@ -579,26 +580,32 @@ then
579580
CFG_ENABLE_CLANG=1
580581
putvar CFG_ENABLE_CLANG
581582
else
582-
# on OS X, with xcode 5 and newer, certain developers may have
583-
# cc, gcc and g++ point to a mixture of clang and gcc
584-
# if so, this will create very strange build errors
585-
# this last stanza is to detect some such problems and save the future rust
586-
# contributor some time solving that issue.
587-
# this detection could be generalized to other OSes aside from OS X
588-
# but the issue seems most likely to happen on OS X
589-
590-
chk_cc () {
591-
$1 --version 2> /dev/null | grep -q $2
592-
}
593-
# check that gcc, cc and g++ all point to the same compiler.
594-
# note that for xcode 5, g++ points to clang, not clang++
595-
if !((chk_cc gcc clang && chk_cc g++ clang) ||
596-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
597-
err "the gcc and g++ in your path point to different compilers.
598-
Check which versions are in your path with cc --version and g++ --version.
599-
To resolve this problem, either fix your PATH or run configure with --enable-clang"
600-
fi
583+
if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then
584+
step_msg "older GCC found, using clang instead"
585+
CFG_ENABLE_CLANG=1
586+
putvar CFG_ENABLE_CLANG
587+
else
588+
# on OS X, with xcode 5 and newer, certain developers may have
589+
# cc, gcc and g++ point to a mixture of clang and gcc
590+
# if so, this will create very strange build errors
591+
# this last stanza is to detect some such problems and save the future rust
592+
# contributor some time solving that issue.
593+
# this detection could be generalized to other OSes aside from OS X
594+
# but the issue seems most likely to happen on OS X
595+
596+
chk_cc () {
597+
$1 --version 2> /dev/null | grep -q $2
598+
}
599+
# check that gcc, cc and g++ all point to the same compiler.
600+
# note that for xcode 5, g++ points to clang, not clang++
601+
if !((chk_cc gcc clang && chk_cc g++ clang) ||
602+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
603+
err "the gcc and g++ in your path point to different compilers.
604+
Check which versions are in your path with cc --version and g++ --version.
605+
To resolve this problem, either fix your PATH or run configure with --enable-clang"
606+
fi
601607

608+
fi
602609
fi
603610
fi
604611

@@ -921,10 +928,6 @@ do
921928
LLVM_OPTS="$LLVM_OPTS --disable-terminfo"
922929
# Try to have LLVM pull in as few dependencies as possible (#9397)
923930
LLVM_OPTS="$LLVM_OPTS --disable-zlib --disable-libffi"
924-
# LLVM says it needs a "new" clang/gcc, but we seem to get by ok with
925-
# older versions on the bots. Get by for a little longer by asking it to
926-
# not do version detection
927-
LLVM_OPTS="$LLVM_OPTS --disable-compiler-version-checks"
928931

929932
# Use win32 native thread/lock apis instead of pthread wrapper.
930933
# (llvm's configure tries to find pthread first, so we have to disable it explicitly.)
@@ -942,13 +945,15 @@ do
942945

943946
LLVM_CXX_64="ccache clang++ -Qunused-arguments"
944947
LLVM_CC_64="ccache clang -Qunused-arguments"
948+
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
945949
;;
946950
("clang")
947951
LLVM_CXX_32="clang++ -m32 -Qunused-arguments"
948952
LLVM_CC_32="clang -m32 -Qunused-arguments"
949953

950954
LLVM_CXX_64="clang++ -Qunused-arguments"
951955
LLVM_CC_64="clang -Qunused-arguments"
956+
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
952957
;;
953958
("ccache gcc")
954959
LLVM_CXX_32="ccache g++ -m32"

branches/try2/man/rustc.1

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.TH RUSTC "1" "March 2014" "rustc 0.11-pre" "User Commands"
22
.SH NAME
3-
rustc \- rust compiler
3+
rustc \- The Rust compiler
44
.SH SYNOPSIS
55
.B rustc
66
[\fIOPTIONS\fR] \fIINPUT\fR
@@ -27,15 +27,20 @@ Display this message
2727
\fB\-L\fR PATH
2828
Add a directory to the library search path
2929
.TP
30-
\fB\-\-ls\fR
31-
List the symbols defined by a library crate
32-
.TP
3330
\fB\-\-no\-trans\fR
3431
Run all passes except translation; no output
3532
.TP
36-
\fB\-g\fR, \fB\-\-debuginfo\fR
33+
\fB\-\-no\-analysis\fR
34+
Parse and expand the source, but run no analysis and produce no output
35+
.TP
36+
\fB\-g\fR
3737
Emit DWARF debug information into object files generated.
3838
.TP
39+
\fB\-\-debuginfo\fR LEVEL
40+
Emit DWARF debug info to the objects created: 0 = no debug info, 1 =
41+
line-tables only (for stacktraces and breakpoints), 2 = full debug
42+
info with variable and type information (same as -g).
43+
.TP
3944
\fB\-O\fR
4045
Equivalent to \fI\-\-opt\-level=2\fR
4146
.TP
@@ -58,6 +63,10 @@ Pretty-print the input instead of compiling; valid types are: normal
5863
expanded, with type annotations), or identified (fully parenthesized,
5964
AST nodes and blocks with IDs)
6065
.TP
66+
\fB\-\-dep-info\fR [FILENAME]
67+
Output dependency info to <filename> after compiling, in o format suitable
68+
for use by Makefiles.
69+
.TP
6170
\fB\-\-sysroot\fR PATH
6271
Override the system root
6372
.TP
@@ -151,15 +160,14 @@ level.
151160
Generates software floating point library calls instead of hardware
152161
instructions.
153162
.TP
154-
\fBgen-crate-map\fR
155-
Forces generate of a toplevel crate map. May be required for logging to work
156-
when rust is embedded into another application.
157-
.TP
158163
\fBprefer-dynamic\fR
159164
Prefers dynamic linking to static linking.
160165
.TP
161166
\fBno-integrated-as\fR
162167
Force usage of an external assembler rather than LLVM's integrated one.
168+
.TP
169+
\fBrelocation-model\fR=[pic,static,dynamic-no-pic]
170+
The relocation model to use. (default: pic)
163171

164172
.SH "EXAMPLES"
165173
To build an executable from a source file with a main function:
@@ -182,8 +190,7 @@ rustdoc
182190
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
183191

184192
.SH "AUTHOR"
185-
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
186-
<\fI[email protected]\fR> is the project leader.
193+
See \fBAUTHORS.txt\fR in the Rust source distribution.
187194

188195
.SH "COPYRIGHT"
189196
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR

branches/try2/man/rustdoc.1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ rustc
9090
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
9191

9292
.SH "AUTHOR"
93-
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
94-
<\fI[email protected]\fR> is the project leader.
93+
See \fBAUTHORS.txt\fR in the Rust source distribution.
9594

9695
.SH "COPYRIGHT"
9796
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR

branches/try2/mk/crates.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log
55-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat
54+
workcache url log regex graphviz
55+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

@@ -67,6 +67,7 @@ DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
6767
test time
6868
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
70+
DEPS_graphviz := std
7071
DEPS_glob := std
7172
DEPS_serialize := std collections log
7273
DEPS_term := std collections
@@ -84,6 +85,8 @@ DEPS_rand := std
8485
DEPS_url := std collections
8586
DEPS_workcache := std serialize collections log
8687
DEPS_log := std sync
88+
DEPS_regex := std collections
89+
DEPS_regex_macros = syntax std regex
8790

8891
TOOL_DEPS_compiletest := test green rustuv getopts
8992
TOOL_DEPS_rustdoc := rustdoc native

branches/try2/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ PKG_EXE = dist/$(PKG_NAME)-install.exe
118118
%.ico: $(S)src/etc/pkg/%.ico
119119
cp $< $@
120120

121-
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
121+
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
122122
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
123123
dist-prepare-win
124124
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin

branches/try2/mk/docs.mk

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# L10N_LANGS are the languages for which the docs have been
2727
# translated.
2828
######################################################################
29-
DOCS := index tutorial guide-ffi guide-macros guide-lifetimes \
29+
DOCS := index intro tutorial guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport complement-cheatsheet \
3232
complement-lang-faq complement-project-faq rust rustdoc \
@@ -141,6 +141,26 @@ doc/footer.inc: $(D)/footer.inc | doc/
141141
@$(call E, cp: $@)
142142
$(Q)cp -a $< $@ 2> /dev/null
143143

144+
doc/FiraSans-Regular.woff: $(D)/FiraSans-Regular.woff | doc/
145+
@$(call E, cp: $@)
146+
$(Q)cp -a $< $@ 2> /dev/null
147+
148+
doc/FiraSans-Medium.woff: $(D)/FiraSans-Medium.woff | doc/
149+
@$(call E, cp: $@)
150+
$(Q)cp -a $< $@ 2> /dev/null
151+
152+
doc/Heuristica-Regular.woff: $(D)/Heuristica-Regular.woff | doc/
153+
@$(call E, cp: $@)
154+
$(Q)cp -a $< $@ 2> /dev/null
155+
156+
doc/Heuristica-Italic.woff: $(D)/Heuristica-Italic.woff | doc/
157+
@$(call E, cp: $@)
158+
$(Q)cp -a $< $@ 2> /dev/null
159+
160+
doc/Heuristica-Bold.woff: $(D)/Heuristica-Bold.woff | doc/
161+
@$(call E, cp: $@)
162+
$(Q)cp -a $< $@ 2> /dev/null
163+
144164
# The (english) documentation for each doc item.
145165

146166
define DEF_SHOULD_BUILD_PDF_DOC

branches/try2/mk/llvm.mk

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,25 @@ $$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
4242
@$$(call E, make: done cleaning llvm)
4343
touch $$@
4444

45+
ifeq ($$(CFG_ENABLE_LLVM_STATIC_STDCPP),1)
46+
LLVM_STDCPP_LOCATION_$(1) = $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
47+
-print-file-name=libstdc++.a)
48+
else
49+
LLVM_STDCPP_LOCATION_$(1) =
50+
endif
51+
4552
endef
4653

4754
$(foreach host,$(CFG_HOST), \
48-
$(eval LLVM_CONFIGS := $(LLVM_CONFIGS) $(LLVM_CONFIG_$(host))))
55+
$(eval $(call DEF_LLVM_RULES,$(host))))
4956

5057
$(foreach host,$(CFG_HOST), \
51-
$(eval $(call DEF_LLVM_RULES,$(host))))
58+
$(eval LLVM_CONFIGS := $(LLVM_CONFIGS) $(LLVM_CONFIG_$(host))))
5259

5360
$(S)src/librustc/lib/llvmdeps.rs: \
5461
$(LLVM_CONFIGS) \
55-
$(S)src/etc/mklldeps.py
62+
$(S)src/etc/mklldeps.py \
63+
$(MKFILE_DEPS)
5664
$(Q)$(CFG_PYTHON) $(S)src/etc/mklldeps.py \
57-
"$@" "$(LLVM_COMPONENTS)" $(LLVM_CONFIGS)
65+
"$@" "$(LLVM_COMPONENTS)" "$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \
66+
$(LLVM_CONFIGS)

branches/try2/mk/main.mk

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
311311
else
312312
HSREQ$(1)_H_$(3) = \
313313
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
314-
$$(HLIB$(1)_H_$(3))/stamp.rustc \
315-
$$(foreach dep,$$(RUST_DEPS_rustc),$$(HLIB$(1)_H_$(3))/stamp.$$(dep)) \
316314
$$(MKFILE_DEPS)
317315
endif
318316

@@ -334,8 +332,7 @@ SREQ$(1)_T_$(2)_H_$(3) = \
334332
CSREQ$(1)_T_$(2)_H_$(3) = \
335333
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
336334
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
337-
$$(foreach dep,$$(CRATES),$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
338-
$$(foreach dep,$$(HOST_CRATES),$$(HLIB$(1)_H_$(3))/stamp.$$(dep))
335+
$$(foreach dep,$$(CRATES),$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep))
339336

340337
ifeq ($(1),0)
341338
# Don't run the stage0 compiler under valgrind - that ship has sailed
@@ -349,21 +346,44 @@ EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
349346

350347
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
351348

349+
endef
350+
351+
# Same macro/variables as above, but defined in a separate loop so it can use
352+
# all the varibles above for all archs. The RPATH_VAR setup sometimes needs to
353+
# reach across triples to get things in order.
354+
define SREQ_CMDS
355+
356+
ifeq ($$(OSTYPE_$(3)),apple-darwin)
357+
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
358+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
359+
else
360+
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
361+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
362+
endif
363+
352364
# Pass --cfg stage0 only for the build->host part of stage0;
353365
# if you're building a cross config, the host->* parts are
354366
# effectively stage1, since it uses the just-built stage0.
367+
#
368+
# This logic is similar to how the LD_LIBRARY_PATH variable must
369+
# change be slightly different when doing cross compilations.
370+
# The build doesn't copy over all target libraries into
371+
# a new directory, so we need to point the library path at
372+
# the build directory where all the target libraries came
373+
# from (the stage0 build host). Otherwise the relative rpaths
374+
# inside of the rustc binary won't get resolved correctly.
355375
ifeq ($(1),0)
356376
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
357377
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
358-
endif
359-
endif
360378

361379
ifeq ($$(OSTYPE_$(3)),apple-darwin)
362380
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
363-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
381+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
364382
else
365383
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
366-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
384+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
385+
endif
386+
endif
367387
endif
368388

369389
STAGE$(1)_T_$(2)_H_$(3) := \
@@ -390,6 +410,11 @@ $(foreach build,$(CFG_HOST), \
390410
$(eval $(foreach stage,$(STAGES), \
391411
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
392412

413+
$(foreach build,$(CFG_HOST), \
414+
$(eval $(foreach target,$(CFG_TARGET), \
415+
$(eval $(foreach stage,$(STAGES), \
416+
$(eval $(call SREQ_CMDS,$(stage),$(target),$(build))))))))
417+
393418
######################################################################
394419
# rustc-H-targets
395420
#

0 commit comments

Comments
 (0)