Skip to content

Commit 0fd3c77

Browse files
committed
---
yaml --- r: 149949 b: refs/heads/try2 c: 4443fb3 h: refs/heads/master i: 149947: 0764be9 v: v3
1 parent 42af999 commit 0fd3c77

File tree

295 files changed

+47343
-5458
lines changed

Some content is hidden

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

295 files changed

+47343
-5458
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: a63deeb3d32fc21f36d484d62a3ea1d3d0c82500
8+
refs/heads/try2: 4443fb3cfa945cf7cb791cf8f2ec81b7faf25132
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ HOST_CRATES := syntax rustc rustdoc fourcc hexfloat
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

58-
DEPS_std := native:rustrt native:compiler-rt
58+
DEPS_std := native:rustrt native:compiler-rt native:backtrace
5959
DEPS_extra := std term sync serialize getopts collections time rand
6060
DEPS_green := std rand native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support

branches/try2/mk/docs.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ SHOULD_BUILD_PDF_DOC_$(1) = 1
147147
endef
148148
$(foreach docname,$(PDF_DOCS),$(eval $(call DEF_SHOULD_BUILD_PDF_DOC,$(docname))))
149149

150+
doc/footer.tex: $(D)/footer.inc | doc/
151+
@$(call E, pandoc: $@)
152+
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
153+
150154
define DEF_DOC
151155

152156
# HTML (rustdoc)
@@ -163,10 +167,6 @@ doc/$(1).epub: $$(D)/$(1).md | doc/
163167
@$$(call E, pandoc: $$@)
164168
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) $$< --output=$$@
165169

166-
doc/footer.tex: $(D)/footer.inc | doc/
167-
@$$(call E, pandoc: $$@)
168-
$$(CFG_PANDOC) --from=html --to=latex $$< --output=$$@
169-
170170
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
171171
DOC_TARGETS += doc/$(1).tex
172172
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/

branches/try2/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ CFG_PATH_MUNGE_arm-unknown-linux-gnueabihf := true
330330
CFG_LDPATH_arm-unknown-linux-gnueabihf :=
331331
CFG_RUN_arm-unknown-linux-gnueabihf=$(2)
332332
CFG_RUN_TARG_arm-unknown-linux-gnueabihf=$(call CFG_RUN_arm-unknown-linux-gnueabihf,,$(2))
333-
RUSTC_FLAGS_arm-unknown-linux-gnueabihf :=
333+
RUSTC_FLAGS_arm-unknown-linux-gnueabihf := -C target-feature=+v7,+vfp3
334334
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabihf :=
335335

336336
# arm-unknown-linux-gnueabi configuration

branches/try2/mk/rt.mk

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,73 @@ $$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
249249
triple-runtime
250250
$$(Q)cp $$(COMPRT_BUILD_DIR_$(1))/triple/runtime/libcompiler_rt.a $$(COMPRT_LIB_$(1))
251251

252+
################################################################################
253+
# libbacktrace
254+
#
255+
# We use libbacktrace on linux to get symbols in backtraces, but only on linux.
256+
# Elsewhere we use other system utilities, so this library is only built on
257+
# linux.
258+
################################################################################
259+
260+
BACKTRACE_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),backtrace)
261+
BACKTRACE_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(BACKTRACE_NAME_$(1))
262+
BACKTRACE_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/libbacktrace
263+
264+
ifeq ($$(findstring darwin,$$(OSTYPE_$(1))),darwin)
265+
266+
# We don't use this on platforms that aren't linux-based, so just make the file
267+
# available, the compilation of libstd won't actually build it.
268+
$$(BACKTRACE_LIB_$(1)):
269+
touch $$@
270+
271+
else
272+
ifeq ($$(CFG_WINDOWSY_$(1)),1)
273+
$$(BACKTRACE_LIB_$(1)):
274+
touch $$@
275+
else
276+
277+
ifdef CFG_ENABLE_FAST_MAKE
278+
BACKTRACE_DEPS := $(S)/.gitmodules
279+
else
280+
BACKTRACE_DEPS := $(wildcard $(S)src/libbacktrace/*)
281+
endif
282+
283+
# We need to export CFLAGS because otherwise it doesn't pick up cross compile
284+
# builds. If libbacktrace doesn't realize this, it will attempt to read 64-bit
285+
# elf headers when compiled for a 32-bit system, yielding blank backtraces.
286+
#
287+
# This also removes the -Werror flag specifically to prevent errors during
288+
# configuration.
289+
#
290+
# Down below you'll also see echos into the config.h generated by the
291+
# ./configure script. This is done to force libbacktrace to *not* use the
292+
# atomic/sync functionality because it pulls in unnecessary dependencies and we
293+
# never use it anyway.
294+
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: \
295+
export CFLAGS:=$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) \
296+
-fno-stack-protector
297+
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export CC:=$$(CC_$(1))
298+
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export AR:=$$(AR_$(1))
299+
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: export RANLIB:=$$(AR_$(1)) s
300+
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
301+
$$(Q)rm -rf $$(BACKTRACE_BUILD_DIR_$(1))
302+
$$(Q)mkdir -p $$(BACKTRACE_BUILD_DIR_$(1))
303+
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && \
304+
$(S)src/libbacktrace/configure --target=$(1) --host=$(CFG_BUILD))
305+
$$(Q)echo '#undef HAVE_ATOMIC_FUNCTIONS' >> \
306+
$$(BACKTRACE_BUILD_DIR_$(1))/config.h
307+
$$(Q)echo '#undef HAVE_SYNC_FUNCTIONS' >> \
308+
$$(BACKTRACE_BUILD_DIR_$(1))/config.h
309+
310+
$$(BACKTRACE_LIB_$(1)): $$(BACKTRACE_BUILD_DIR_$(1))/Makefile $$(MKFILE_DEPS)
311+
@$$(call E, make: libbacktrace)
312+
$$(Q)$$(MAKE) -C $$(BACKTRACE_BUILD_DIR_$(1)) \
313+
INCDIR=$(S)src/libbacktrace
314+
$$(Q)cp $$(BACKTRACE_BUILD_DIR_$(1))/.libs/libbacktrace.a $$@
315+
316+
endif # endif for windowsy
317+
endif # endif for darwin
318+
252319
endef
253320

254321
# Instantiate template for all stages/targets

branches/try2/mk/tests.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ tidy:
240240
| grep '^$(S)src/libuv' -v \
241241
| grep '^$(S)src/llvm' -v \
242242
| grep '^$(S)src/gyp' -v \
243+
| grep '^$(S)src/libbacktrace' -v \
243244
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
244245
$(Q)find $(S)src/etc -name '*.py' \
245246
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
@@ -266,6 +267,7 @@ tidy:
266267
| grep '^$(S)src/etc' -v \
267268
| grep '^$(S)src/doc' -v \
268269
| grep '^$(S)src/compiler-rt' -v \
270+
| grep '^$(S)src/libbacktrace' -v \
269271
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
270272

271273
endif

branches/try2/src/compiletest/compiletest.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
191191
}
192192

193193
pub fn str_mode(s: ~str) -> mode {
194-
match s {
195-
~"compile-fail" => mode_compile_fail,
196-
~"run-fail" => mode_run_fail,
197-
~"run-pass" => mode_run_pass,
198-
~"pretty" => mode_pretty,
199-
~"debug-info" => mode_debug_info,
200-
~"codegen" => mode_codegen,
194+
match s.as_slice() {
195+
"compile-fail" => mode_compile_fail,
196+
"run-fail" => mode_run_fail,
197+
"run-pass" => mode_run_pass,
198+
"pretty" => mode_pretty,
199+
"debug-info" => mode_debug_info,
200+
"codegen" => mode_codegen,
201201
_ => fail!("invalid mode")
202202
}
203203
}

branches/try2/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
1919
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
2020
let mut line_num = 1u;
2121
for ln in rdr.lines() {
22-
error_patterns.push_all_move(parse_expected(line_num, ln));
22+
error_patterns.push_all_move(parse_expected(line_num, ln.unwrap()));
2323
line_num += 1u;
2424
}
2525
return error_patterns;

branches/try2/src/compiletest/header.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
140140
// Assume that any directives will be found before the first
141141
// module or function. This doesn't seem to be an optimization
142142
// with a warm page cache. Maybe with a cold one.
143+
let ln = ln.unwrap();
143144
if ln.starts_with("fn") || ln.starts_with("mod") {
144145
return true;
145146
} else { if !(it(ln.trim())) { return false; } }

branches/try2/src/compiletest/runtest.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ use test::MetricMap;
3838

3939
pub fn run(config: config, testfile: ~str) {
4040

41-
match config.target {
41+
match config.target.as_slice() {
4242

43-
~"arm-linux-androideabi" => {
43+
"arm-linux-androideabi" => {
4444
if !config.adb_device_status {
4545
fail!("android device not available");
4646
}
@@ -277,8 +277,8 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
277277
let exe_file = make_exe_name(config, testfile);
278278
279279
let mut proc_args;
280-
match config.target {
281-
~"arm-linux-androideabi" => {
280+
match config.target.as_slice() {
281+
"arm-linux-androideabi" => {
282282

283283
cmds = cmds.replace("run","continue");
284284

@@ -682,9 +682,9 @@ fn exec_compiled_test(config: &config, props: &TestProps,
682682

683683
let env = props.exec_env.clone();
684684

685-
match config.target {
685+
match config.target.as_slice() {
686686

687-
~"arm-linux-androideabi" => {
687+
"arm-linux-androideabi" => {
688688
_arm_exec_compiled_test(config, props, testfile, env)
689689
}
690690

@@ -735,9 +735,9 @@ fn compose_and_run_compiler(
735735
&auxres);
736736
}
737737

738-
match config.target {
738+
match config.target.as_slice() {
739739

740-
~"arm-linux-androideabi" => {
740+
"arm-linux-androideabi" => {
741741
_arm_push_aux_shared_library(config, testfile);
742742
}
743743

0 commit comments

Comments
 (0)