Skip to content

Commit b995f7a

Browse files
committed
---
yaml --- r: 112204 b: refs/heads/try c: 1563ea9 h: refs/heads/master v: v3
1 parent 3f99f06 commit b995f7a

File tree

1,104 files changed

+11256
-14985
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,104 files changed

+11256
-14985
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: a692e9b1234ff6573b0cfbc39394d9222eb38f81
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b5dd3f05fe95168b5569d0f519636149479eb6ac
5-
refs/heads/try: 4d496933dcd8d1b6a3656f3d5008956dcb4517c1
5+
refs/heads/try: 1563ea9f278e1e1cd0d21fe8c4fc761805b71964
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ documentation.
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/try/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/try/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/try/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/try/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/try/mk/docs.mk

Lines changed: 1 addition & 2 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 \
@@ -269,7 +269,6 @@ LIB_DOC_DEP_$(1) = $$(CRATEFILE_$(1)) $$(RSINPUTS_$(1))
269269
endif
270270

271271
$(2) += doc/$(1)/index.html
272-
doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
273272
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1))
274273
@$$(call E, rustdoc $$@)
275274
$$(Q)$$(RUSTDOC) --cfg dox --cfg stage2 $$<

branches/try/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/try/mk/main.mk

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -349,44 +349,25 @@ EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
349349

350350
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
351351

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

361+
ifdef CFG_DISABLE_RPATH
382362
ifeq ($$(OSTYPE_$(3)),apple-darwin)
383363
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
384-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
364+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
385365
else
386366
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
387-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
388-
endif
367+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
389368
endif
369+
else
370+
RPATH_VAR$(1)_T_$(2)_H_$(3) :=
390371
endif
391372

392373
STAGE$(1)_T_$(2)_H_$(3) := \
@@ -413,11 +394,6 @@ $(foreach build,$(CFG_HOST), \
413394
$(eval $(foreach stage,$(STAGES), \
414395
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
415396

416-
$(foreach build,$(CFG_HOST), \
417-
$(eval $(foreach target,$(CFG_TARGET), \
418-
$(eval $(foreach stage,$(STAGES), \
419-
$(eval $(call SREQ_CMDS,$(stage),$(target),$(build))))))))
420-
421397
######################################################################
422398
# rustc-H-targets
423399
#

branches/try/mk/prepare.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

23+
24+
# On windows we install from stage3, but on unix only stage2
25+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
26+
PREPARE_STAGE=3
27+
else
2328
PREPARE_STAGE=2
29+
endif
2430

2531
DEFAULT_PREPARE_DIR_CMD = umask 022 && mkdir -p
2632
DEFAULT_PREPARE_BIN_CMD = install -m755

branches/try/mk/target.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8383
$$(WFLAGS_ST$(1)) \
8484
-L "$$(RT_OUTPUT_DIR_$(2))" \
8585
-L "$$(LLVM_LIBDIR_$(2))" \
86-
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
8786
--out-dir $$(@D) $$<
8887
@touch $$@
8988
$$(call LIST_ALL_OLD_GLOB_MATCHES,\

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
568568
--host $(3) \
569569
--adb-path=$(CFG_ADB) \
570570
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
571-
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
571+
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
572572
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
573573
$$(CTEST_TESTARGS)
574574

0 commit comments

Comments
 (0)