Skip to content

Commit b98befc

Browse files
committed
---
yaml --- r: 95831 b: refs/heads/dist-snap c: 60cb1fb h: refs/heads/master i: 95829: 3d3a4e8 95827: 3454f3c 95823: c48aeb8 v: v3
1 parent 6ee05f6 commit b98befc

39 files changed

+989
-1259
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: c15038db0843835bb075e2b37547e22a65604b0b
9+
refs/heads/dist-snap: 60cb1fb4d1bf31ddcf469943b2f35c9da96c72d2
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/configure

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,11 @@ valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
400400
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
401401
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
402402

403+
#Deprecated opts to keep compatibility
404+
valopt build-triple "${CFG_BUILD}" "LLVM build triple"
405+
valopt host-triples "${CFG_HOST}" "LLVM host triples"
406+
valopt target-triples "${CFG_TARGET}" "LLVM target triples"
407+
403408
# Validate Options
404409
step_msg "validating $CFG_SELF args"
405410
validate_opt
@@ -463,12 +468,14 @@ then
463468
# extract the first 2 version fields, ignore everything else
464469
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
465470

471+
MIN_PV_MAJOR="1"
472+
MIN_PV_MINOR="9"
466473
# these patterns are shell globs, *not* regexps
467474
PV_MAJOR=${PV_MAJOR_MINOR% *}
468475
PV_MINOR=${PV_MAJOR_MINOR#* }
469-
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
476+
if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
470477
then
471-
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
478+
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"
472479
BAD_PANDOC=1
473480
fi
474481
fi
@@ -596,6 +603,7 @@ then
596603
fi
597604

598605
# a little post-processing of various config values
606+
599607
CFG_PREFIX=${CFG_PREFIX%/}
600608
CFG_MANDIR=${CFG_MANDIR%/}
601609
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
@@ -610,6 +618,26 @@ do
610618
done
611619
CFG_TARGET=$V_TEMP
612620

621+
# copy host-triples to target-triples so that hosts are a subset of targets
622+
# XXX: remove deprecated variables here
623+
V_TEMP=""
624+
for i in $CFG_HOST_TRIPLES $CFG_TARGET_TRIPLES;
625+
do
626+
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
627+
done
628+
CFG_TARGET_TRIPLES=$V_TEMP
629+
630+
# XXX: Support for deprecated syntax, should be dropped.
631+
if [ ! -z "$CFG_BUILD_TRIPLE" ]; then
632+
CFG_BUILD=${CFG_BUILD_TRIPLE}
633+
fi
634+
if [ ! -z "$CFG_HOST_TRIPLES" ]; then
635+
CFG_HOST=${CFG_HOST_TRIPLES}
636+
fi
637+
if [ ! -z "$CFG_TARGET_TRIPLES" ]; then
638+
CFG_TARGET=${CFG_TARGET_TRIPLES}
639+
fi
640+
613641
# check target-specific tool-chains
614642
for i in $CFG_TARGET
615643
do
@@ -644,13 +672,6 @@ do
644672
fi
645673
;;
646674

647-
arm-apple-darwin)
648-
if [ $CFG_OSTYPE != apple-darwin ]
649-
then
650-
err "The iOS target is only supported on Mac OS X"
651-
fi
652-
;;
653-
654675
*)
655676
;;
656677
esac

branches/dist-snap/mk/platform.mk

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -193,35 +193,6 @@ CFG_LDPATH_i686-unknown-linux-gnu :=
193193
CFG_RUN_i686-unknown-linux-gnu=$(2)
194194
CFG_RUN_TARG_i686-unknown-linux-gnu=$(call CFG_RUN_i686-unknown-linux-gnu,,$(2))
195195

196-
# arm-apple-darwin configuration
197-
ifeq ($(CFG_OSTYPE),apple-darwin)
198-
CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos)
199-
CFG_IOS_FLAGS = -target arm-apple-darwin -isysroot $(CFG_IOS_SDK) -I $(CFG_IOS_SDK)/usr/include -I $(CFG_IOS_SDK)/usr/include/c++/4.2.1 -I /usr/include
200-
CC_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang)
201-
CXX_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++)
202-
CPP_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++)
203-
AR_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos ar)
204-
CFG_LIB_NAME_arm-apple-darwin = lib$(1).dylib
205-
CFG_LIB_GLOB_arm-apple-darwin = lib$(1)-*.dylib
206-
CFG_LIB_DSYM_GLOB_arm-apple-darwin = lib$(1)-*.dylib.dSYM
207-
CFG_GCCISH_CFLAGS_arm-apple-darwin := -Wall -Werror -g -fPIC $(CFG_IOS_FLAGS)
208-
CFG_GCCISH_CXXFLAGS_arm-apple-darwin := -fno-rtti $(CFG_IOS_FLAGS)
209-
CFG_GCCISH_LINK_FLAGS_arm-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind
210-
CFG_GCCISH_DEF_FLAG_arm-apple-darwin := -Wl,-exported_symbols_list,
211-
CFG_GCCISH_PRE_LIB_FLAGS_arm-apple-darwin :=
212-
CFG_GCCISH_POST_LIB_FLAGS_arm-apple-darwin :=
213-
CFG_DEF_SUFFIX_arm-apple-darwin := .darwin.def
214-
CFG_INSTALL_NAME_arm-apple-darwin = -Wl,-install_name,@rpath/$(1)
215-
CFG_LIBUV_LINK_FLAGS_arm-apple-darwin =
216-
CFG_EXE_SUFFIX_arm-apple-darwin :=
217-
CFG_WINDOWSY_arm-apple-darwin :=
218-
CFG_UNIXY_arm-apple-darwin := 1
219-
CFG_PATH_MUNGE_arm-apple-darwin := true
220-
CFG_LDPATH_arm-apple-darwin :=
221-
CFG_RUN_arm-apple-darwin = $(2)
222-
CFG_RUN_TARG_arm-apple-darwin = $(call CFG_RUN_arm-apple-darwin,,$(2))
223-
endif
224-
225196
# x86_64-apple-darwin configuration
226197
CC_x86_64-apple-darwin=$(CC)
227198
CXX_x86_64-apple-darwin=$(CXX)

branches/dist-snap/mk/stage0.mk

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ $(HLIB0_H_$(CFG_BUILD))/$(CFG_EXTRALIB_$(CFG_BUILD)): \
4242
| $(HLIB0_H_$(CFG_BUILD))/
4343
$(Q)touch $@
4444

45-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTUV_$(CFG_BUILD)): \
46-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
47-
| $(HLIB0_H_$(CFG_BUILD))/
45+
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_LIBRUSTUV_$(CFG_BUILD)): \
46+
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD)) \
47+
| $(HLIB0_H_$(CFG_BUILD_TRIPLE))/
4848
$(Q)touch $@
4949

50-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTC_$(CFG_BUILD)): \
51-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
52-
| $(HLIB0_H_$(CFG_BUILD))/
50+
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_LIBRUSTC_$(CFG_BUILD)): \
51+
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD)) \
52+
| $(HLIB0_H_$(CFG_BUILD_TRIPLE))/
5353
$(Q)touch $@
5454

5555
$(HLIB0_H_$(CFG_BUILD))/$(CFG_RUSTLLVM_$(CFG_BUILD)): \
@@ -124,5 +124,5 @@ endef
124124

125125
# Use stage1 to build other architectures: then you don't have to wait
126126
# for stage2, but you get the latest updates to the compiler source.
127-
$(foreach t,$(NON_BUILD_HOST), \
127+
$(foreach t,$(NON_BUILD_HOSTS), \
128128
$(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_BUILD))))

branches/dist-snap/mk/tests.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
164164
$(CFG_ADB_TEST_DIR)) \
165165
$(shell adb push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(EXTRALIB_GLOB_arm-linux-androideabi) \
166166
$(CFG_ADB_TEST_DIR)) \
167-
$(shell adb push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(LIBRUSTUV_GLOB_arm-linux-androideabi) \
167+
$(shell adb push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD_TRIPLE))/$(LIBRUSTUV_GLOB_arm-linux-androideabi) \
168168
$(CFG_ADB_TEST_DIR)) \
169169
)
170170
else
@@ -471,8 +471,8 @@ define DEF_RUSTPKG_STACK_FIX
471471
$$(call TEST_OK_FILE,$(1),$(2),$(3),rustpkg): export RUST_MIN_STACK=8000000
472472
endef
473473

474-
$(foreach host,$(CFG_HOST), \
475-
$(foreach target,$(CFG_TARGET), \
474+
$(foreach host,$(CFG_HOST_TRIPLES), \
475+
$(foreach target,$(CFG_TARGET_TRIPLES), \
476476
$(foreach stage,$(STAGES), \
477477
$(eval $(call DEF_RUSTPKG_STACK_FIX,$(stage),$(target),$(host))))))
478478

branches/dist-snap/src/etc/ziggurat_tables.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import random
2020

2121
# The order should match the return value of `tables`
22-
TABLE_NAMES = ['X', 'F']
22+
TABLE_NAMES = ['X', 'F', 'F_DIFF']
2323

2424
# The actual length of the table is 1 more, to stop
2525
# index-out-of-bounds errors. This should match the bitwise operation
@@ -43,10 +43,13 @@ def tables(r, v, f, f_inv):
4343

4444
# cache the f's
4545
fvec = [0]*(TABLE_LEN+1)
46+
fdiff = [0]*(TABLE_LEN+1)
4647
for i in range(TABLE_LEN+1):
4748
fvec[i] = f(xvec[i])
49+
if i > 0:
50+
fdiff[i] = fvec[i] - fvec[i-1]
4851

49-
return xvec, fvec
52+
return xvec, fvec, fdiff
5053

5154
# Distributions
5255
# N(0, 1)

branches/dist-snap/src/libextra/test.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,6 @@ pub fn run_test(force_ignore: bool,
869869
do task::spawn {
870870
let mut task = task::task();
871871
task.unlinked();
872-
task.name(match desc.name {
873-
DynTestName(ref name) => SendStrOwned(name.clone()),
874-
StaticTestName(name) => SendStrStatic(name),
875-
});
876872
let result_future = task.future_result();
877873
task.spawn(testfn_cell.take());
878874

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ pub fn decl_fn(llmod: ModuleRef, name: &str, cc: lib::llvm::CallConv, ty: Type)
182182
};
183183

184184
lib::llvm::SetFunctionCallConv(llfn, cc);
185-
// Function addresses in Rust are never significant, allowing functions to be merged.
186-
lib::llvm::SetUnnamedAddr(llfn, true);
187185
return llfn;
188186
}
189187

branches/dist-snap/src/librustc/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4560,14 +4560,14 @@ pub fn count_traits_and_supertraits(tcx: ctxt,
45604560
}
45614561

45624562
pub fn get_tydesc_ty(tcx: ctxt) -> Result<t, ~str> {
4563-
do tcx.lang_items.require(TyDescStructLangItem).map |tydesc_lang_item| {
4563+
do tcx.lang_items.require(TyDescStructLangItem).map_move |tydesc_lang_item| {
45644564
tcx.intrinsic_defs.find_copy(&tydesc_lang_item)
45654565
.expect("Failed to resolve TyDesc")
45664566
}
45674567
}
45684568

45694569
pub fn get_opaque_ty(tcx: ctxt) -> Result<t, ~str> {
4570-
do tcx.lang_items.require(OpaqueStructLangItem).map |opaque_lang_item| {
4570+
do tcx.lang_items.require(OpaqueStructLangItem).map_move |opaque_lang_item| {
45714571
tcx.intrinsic_defs.find_copy(&opaque_lang_item)
45724572
.expect("Failed to resolve Opaque")
45734573
}

branches/dist-snap/src/librustc/rustc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ pub fn monitor(f: ~fn(@diagnostic::Emitter)) {
338338
let ch = SharedChan::new(ch);
339339
let ch_capture = ch.clone();
340340
let mut task_builder = task::task();
341-
task_builder.name("rustc");
342341
task_builder.supervised();
343342

344343
// XXX: Hacks on hacks. If the env is trying to override the stack size

branches/dist-snap/src/librustc/util/ppaux.rs

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,10 @@ pub fn ty_to_str(cx: ctxt, typ: t) -> ~str {
308308
ident: Option<ast::Ident>,
309309
sig: &ty::FnSig)
310310
-> ~str {
311-
let mut s = if abis.is_rust() {
312-
~""
313-
} else {
314-
format!("extern {} ", abis.to_str())
315-
};
311+
let mut s = ~"extern ";
312+
313+
s.push_str(abis.to_str());
314+
s.push_char(' ');
316315
317316
match purity {
318317
ast::impure_fn => {}
@@ -332,16 +331,16 @@ pub fn ty_to_str(cx: ctxt, typ: t) -> ~str {
332331
_ => { }
333332
}
334333

335-
push_sig_to_str(cx, &mut s, '(', ')', sig);
334+
push_sig_to_str(cx, &mut s, sig);
336335

337336
return s;
338337
}
339-
fn closure_to_str(cx: ctxt, cty: &ty::ClosureTy) -> ~str {
338+
fn closure_to_str(cx: ctxt, cty: &ty::ClosureTy) -> ~str
339+
{
340340
let is_proc =
341341
(cty.sigil, cty.onceness) == (ast::OwnedSigil, ast::Once);
342-
let is_borrowed_closure = cty.sigil == ast::BorrowedSigil;
343342

344-
let mut s = if is_proc || is_borrowed_closure {
343+
let mut s = if is_proc {
345344
~""
346345
} else {
347346
cty.sigil.to_str()
@@ -375,42 +374,23 @@ pub fn ty_to_str(cx: ctxt, typ: t) -> ~str {
375374
}
376375
};
377376

378-
if !is_borrowed_closure {
379-
s.push_str("fn");
380-
}
377+
s.push_str("fn");
381378
}
382379

383-
if !is_borrowed_closure {
384-
// Print bounds before `fn` if this is not a borrowed closure.
385-
if !cty.bounds.is_empty() {
386-
s.push_str(":");
387-
s.push_str(cty.bounds.repr(cx));
388-
}
389-
390-
push_sig_to_str(cx, &mut s, '(', ')', &cty.sig);
391-
} else {
392-
// Print bounds after the signature if this is a borrowed closure.
393-
push_sig_to_str(cx, &mut s, '|', '|', &cty.sig);
394-
395-
if is_borrowed_closure {
396-
if !cty.bounds.is_empty() {
397-
s.push_str(":");
398-
s.push_str(cty.bounds.repr(cx));
399-
}
400-
}
380+
if !cty.bounds.is_empty() {
381+
s.push_str(":");
401382
}
383+
s.push_str(cty.bounds.repr(cx));
384+
385+
push_sig_to_str(cx, &mut s, &cty.sig);
402386

403387
return s;
404388
}
405-
fn push_sig_to_str(cx: ctxt,
406-
s: &mut ~str,
407-
bra: char,
408-
ket: char,
409-
sig: &ty::FnSig) {
410-
s.push_char(bra);
389+
fn push_sig_to_str(cx: ctxt, s: &mut ~str, sig: &ty::FnSig) {
390+
s.push_char('(');
411391
let strs = sig.inputs.map(|a| fn_input_to_str(cx, *a));
412392
s.push_str(strs.connect(", "));
413-
s.push_char(ket);
393+
s.push_char(')');
414394
if ty::get(sig.output).sty != ty_nil {
415395
s.push_str(" -> ");
416396
if ty::type_is_bot(sig.output) {

branches/dist-snap/src/librustuv/uvio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ fn test_timer_sleep_simple() {
24642464
unsafe {
24652465
let io = local_io();
24662466
let timer = io.timer_init();
2467-
do timer.map |mut t| { t.sleep(1) };
2467+
do timer.map_move |mut t| { t.sleep(1) };
24682468
}
24692469
}
24702470
}

0 commit comments

Comments
 (0)