Skip to content

Commit 45a441b

Browse files
committed
---
yaml --- r: 151310 b: refs/heads/try2 c: 7fefc1c h: refs/heads/master v: v3
1 parent 3a00d93 commit 45a441b

File tree

1,317 files changed

+18405
-36809
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,317 files changed

+18405
-36809
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: 2be738ae36600e562fcfc9ed938e183875cd72ad
8+
refs/heads/try2: 7fefc1c7f417a8445da85e57a9523508a2561ef3
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright (c) 2014 The Rust Project Developers
1+
Copyright (c) 2006-2009 Graydon Hoare
2+
Copyright (c) 2009-2014 Mozilla Foundation
23

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

branches/try2/README.md

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

2222
1. Make sure you have installed the dependencies:
23-
* `g++` 4.7 or `clang++` 3.x
23+
* `g++` 4.4 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`
2928
2. Download and build Rust:
3029

3130
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 a lint for
66+
`try!` macro for unwrapping errors with an early return and an 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: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ 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"
392391
opt rpath 1 "build rpaths into rustc itself"
393392
opt nightly 0 "build nightly packages"
394393
opt verify-install 1 "verify installed binaries work"
@@ -580,32 +579,26 @@ then
580579
CFG_ENABLE_CLANG=1
581580
putvar CFG_ENABLE_CLANG
582581
else
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
607-
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"
608600
fi
601+
609602
fi
610603
fi
611604

@@ -928,6 +921,10 @@ do
928921
LLVM_OPTS="$LLVM_OPTS --disable-terminfo"
929922
# Try to have LLVM pull in as few dependencies as possible (#9397)
930923
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"
931928

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

946943
LLVM_CXX_64="ccache clang++ -Qunused-arguments"
947944
LLVM_CC_64="ccache clang -Qunused-arguments"
948-
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
949945
;;
950946
("clang")
951947
LLVM_CXX_32="clang++ -m32 -Qunused-arguments"
952948
LLVM_CC_32="clang -m32 -Qunused-arguments"
953949

954950
LLVM_CXX_64="clang++ -Qunused-arguments"
955951
LLVM_CC_64="clang -Qunused-arguments"
956-
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
957952
;;
958953
("ccache gcc")
959954
LLVM_CXX_32="ccache g++ -m32"

branches/try2/man/rustc.1

Lines changed: 11 additions & 18 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 \- The Rust compiler
3+
rustc \- rust compiler
44
.SH SYNOPSIS
55
.B rustc
66
[\fIOPTIONS\fR] \fIINPUT\fR
@@ -27,20 +27,15 @@ 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
3033
\fB\-\-no\-trans\fR
3134
Run all passes except translation; no output
3235
.TP
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
36+
\fB\-g\fR, \fB\-\-debuginfo\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
4439
\fB\-O\fR
4540
Equivalent to \fI\-\-opt\-level=2\fR
4641
.TP
@@ -63,10 +58,6 @@ Pretty-print the input instead of compiling; valid types are: normal
6358
expanded, with type annotations), or identified (fully parenthesized,
6459
AST nodes and blocks with IDs)
6560
.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
7061
\fB\-\-sysroot\fR PATH
7162
Override the system root
7263
.TP
@@ -160,14 +151,15 @@ level.
160151
Generates software floating point library calls instead of hardware
161152
instructions.
162153
.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
163158
\fBprefer-dynamic\fR
164159
Prefers dynamic linking to static linking.
165160
.TP
166161
\fBno-integrated-as\fR
167162
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)
171163

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

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

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

branches/try2/man/rustdoc.1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ 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.
93+
See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
94+
<\fI[email protected]\fR> is the project leader.
9495

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

branches/try2/mk/crates.mk

Lines changed: 2 additions & 5 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 regex graphviz
55-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
54+
workcache url log
55+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

@@ -67,7 +67,6 @@ 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
7170
DEPS_glob := std
7271
DEPS_serialize := std collections log
7372
DEPS_term := std collections
@@ -85,8 +84,6 @@ DEPS_rand := std
8584
DEPS_url := std collections
8685
DEPS_workcache := std serialize collections log
8786
DEPS_log := std sync
88-
DEPS_regex := std collections
89-
DEPS_regex_macros = syntax std regex
9087

9188
TOOL_DEPS_compiletest := test green rustuv getopts
9289
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 upgrade.iss LICENSE.txt rust-logo.ico \
121+
$(PKG_EXE): rust.iss modpath.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: 1 addition & 21 deletions
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 intro tutorial guide-ffi guide-macros guide-lifetimes \
29+
DOCS := index 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,26 +141,6 @@ 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-
164144
# The (english) documentation for each doc item.
165145

166146
define DEF_SHOULD_BUILD_PDF_DOC

branches/try2/mk/llvm.mk

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,16 @@ $$(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-
5245
endef
5346

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

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

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

branches/try2/mk/main.mk

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ 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)) \
314316
$$(MKFILE_DEPS)
315317
endif
316318

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

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

347350
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
348351

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-
364352
# Pass --cfg stage0 only for the build->host part of stage0;
365353
# if you're building a cross config, the host->* parts are
366354
# 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.
375355
ifeq ($(1),0)
376356
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
377357
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
358+
endif
359+
endif
378360

379361
ifeq ($$(OSTYPE_$(3)),apple-darwin)
380362
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
381-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
363+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
382364
else
383365
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
384-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
385-
endif
386-
endif
366+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
387367
endif
388368

389369
STAGE$(1)_T_$(2)_H_$(3) := \
@@ -410,11 +390,6 @@ $(foreach build,$(CFG_HOST), \
410390
$(eval $(foreach stage,$(STAGES), \
411391
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
412392

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-
418393
######################################################################
419394
# rustc-H-targets
420395
#

0 commit comments

Comments
 (0)