Skip to content

Commit 9c6ceae

Browse files
committed
---
yaml --- r: 82425 b: refs/heads/auto c: b43ee6c h: refs/heads/master i: 82423: e601c67 v: v3
1 parent 4cfa3d6 commit 9c6ceae

31 files changed

+493
-321
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 2f845a5e0aa9cdd4bc5dc25341bb241643f76f11
16+
refs/heads/auto: b43ee6cd2eab723e4d3fd4f851c2929087e430b3
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ string_body : non_double_quote
248248
| '\x5c' [ '\x22' | common_escape ] ;
249249
250250
common_escape : '\x5c'
251-
| 'n' | 'r' | 't'
251+
| 'n' | 'r' | 't' | '0'
252252
| 'x' hex_digit 2
253253
| 'u' hex_digit 4
254254
| 'U' hex_digit 8 ;

branches/auto/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2828

2929
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3030
@$$(call E, make: llvm)
31-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
31+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1))
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

branches/auto/mk/platform.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ CFG_PATH_MUNGE_mips-unknown-linux-gnu := true
343343
CFG_LDPATH_mips-unknown-linux-gnu :=
344344
CFG_RUN_mips-unknown-linux-gnu=
345345
CFG_RUN_TARG_mips-unknown-linux-gnu=
346+
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32
346347

347348
# i686-pc-mingw32 configuration
348349
CC_i686-pc-mingw32=$(CC)
@@ -352,7 +353,7 @@ AR_i686-pc-mingw32=$(AR)
352353
CFG_LIB_NAME_i686-pc-mingw32=$(1).dll
353354
CFG_LIB_GLOB_i686-pc-mingw32=$(1)-*.dll
354355
CFG_LIB_DSYM_GLOB_i686-pc-mingw32=$(1)-*.dylib.dSYM
355-
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600
356+
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600 -I$(CFG_SRC_DIR)src/etc/mingw-fix-include
356357
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
357358
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
358359
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
@@ -361,6 +362,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
361362
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
362363
CFG_INSTALL_NAME_i686-pc-mingw32 =
363364
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi
365+
CFG_LLVM_BUILD_ENV_i686-pc-mingw32 := CPATH=$(CFG_SRC_DIR)src/etc/mingw-fix-include
364366
CFG_EXE_SUFFIX_i686-pc-mingw32 := .exe
365367
CFG_WINDOWSY_i686-pc-mingw32 := 1
366368
CFG_UNIXY_i686-pc-mingw32 :=
@@ -479,7 +481,7 @@ define CFG_MAKE_TOOLCHAIN
479481
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
480482
$$(call CFG_INSTALL_NAME_$(1),$$(4))
481483

482-
ifneq ($(HOST_$(1)),arm)
484+
ifeq ($$(findstring $(HOST_$(1)),arm mips),)
483485

484486
# We're using llvm-mc as our assembler because it supports
485487
# .cfi pseudo-ops on mac
@@ -491,7 +493,7 @@ define CFG_MAKE_TOOLCHAIN
491493
-o=$$(1)
492494
else
493495

494-
# For the ARM crosses, use the toolchain assembler
496+
# For the ARM and MIPS crosses, use the toolchain assembler
495497
# XXX: We should be able to use the LLVM assembler
496498
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
497499

branches/auto/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# working under these assumptions).
2525

2626
# Hack for passing flags into LIBUV, see below.
27-
LIBUV_FLAGS_i386 = -m32 -fPIC
27+
LIBUV_FLAGS_i386 = -m32 -fPIC -I$(S)src/etc/mingw-fix-include
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929
ifeq ($(OSTYPE_$(1)), linux-androideabi)
3030
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99

branches/auto/src/compiletest/compiletest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ extern mod extra;
1717

1818
use std::os;
1919
use std::rt;
20-
use std::f64;
2120

2221
use extra::getopts;
2322
use extra::getopts::groups::{optopt, optflag, reqopt};
@@ -131,7 +130,7 @@ pub fn parse_config(args: ~[~str]) -> config {
131130
ratchet_noise_percent:
132131
getopts::opt_maybe_str(matches,
133132
"ratchet-noise-percent").map_move(|s|
134-
f64::from_str(s).unwrap()),
133+
from_str::<f64>(s).unwrap()),
135134
runtool: getopts::opt_maybe_str(matches, "runtool"),
136135
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
137136
jit: getopts::opt_present(matches, "jit"),
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The purpose of these headers is to fix issues with mingw v4.0, as described in #9246.
2+
3+
This works by adding this directory to GCC include search path before mingw system headers directories,
4+
so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
5+
6+
Once mingw fixes all 3 issues mentioned in #9246, this directory and all references to it from rust/mk/* may be removed.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _FIX_CXXCONFIG_H
2+
#define _FIX_CXXCONFIG_H 1
3+
4+
#define _GLIBCXX_HAVE_FENV_H 1
5+
6+
#include_next <bits/c++config.h>
7+
8+
#endif
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _FIX_WINBASE_H
2+
#define _FIX_WINBASE_H 1
3+
4+
#define NTDDK_VERSION NTDDI_VERSION
5+
6+
#include_next <winbase.h>
7+
8+
#endif
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef _FIX_WINSOCK2_H
2+
#define _FIX_WINSOCK2_H 1
3+
4+
#include_next <winsock2.h>
5+
6+
typedef struct pollfd {
7+
SOCKET fd;
8+
short events;
9+
short revents;
10+
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
11+
12+
#endif

branches/auto/src/librustc/middle/const_eval.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use syntax::visit;
1919
use syntax::visit::Visitor;
2020
use syntax::ast::*;
2121

22-
use std::float;
2322
use std::hashmap::{HashMap, HashSet};
2423

2524
//
@@ -476,9 +475,9 @@ pub fn lit_to_const(lit: &lit) -> const_val {
476475
lit_int(n, _) => const_int(n),
477476
lit_uint(n, _) => const_uint(n),
478477
lit_int_unsuffixed(n) => const_int(n),
479-
lit_float(n, _) => const_float(float::from_str(n).unwrap() as f64),
478+
lit_float(n, _) => const_float(from_str::<float>(n).unwrap() as f64),
480479
lit_float_unsuffixed(n) =>
481-
const_float(float::from_str(n).unwrap() as f64),
480+
const_float(from_str::<float>(n).unwrap() as f64),
482481
lit_nil => const_int(0i64),
483482
lit_bool(b) => const_bool(b)
484483
}

branches/auto/src/librustc/middle/lang_items.rs

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -59,36 +59,36 @@ pub enum LangItem {
5959

6060
StrEqFnLangItem, // 19
6161
UniqStrEqFnLangItem, // 20
62-
FailFnLangItem, // 21
63-
FailBoundsCheckFnLangItem, // 22
64-
ExchangeMallocFnLangItem, // 23
65-
ClosureExchangeMallocFnLangItem, // 24
66-
ExchangeFreeFnLangItem, // 25
67-
MallocFnLangItem, // 26
68-
FreeFnLangItem, // 27
69-
BorrowAsImmFnLangItem, // 28
70-
BorrowAsMutFnLangItem, // 29
71-
ReturnToMutFnLangItem, // 30
72-
CheckNotBorrowedFnLangItem, // 31
73-
StrDupUniqFnLangItem, // 32
74-
RecordBorrowFnLangItem, // 33
75-
UnrecordBorrowFnLangItem, // 34
76-
77-
StartFnLangItem, // 35
78-
79-
TyDescStructLangItem, // 36
80-
TyVisitorTraitLangItem, // 37
81-
OpaqueStructLangItem, // 38
62+
FailFnLangItem, // 22
63+
FailBoundsCheckFnLangItem, // 23
64+
ExchangeMallocFnLangItem, // 24
65+
ClosureExchangeMallocFnLangItem, // 25
66+
ExchangeFreeFnLangItem, // 26
67+
MallocFnLangItem, // 27
68+
FreeFnLangItem, // 28
69+
BorrowAsImmFnLangItem, // 29
70+
BorrowAsMutFnLangItem, // 30
71+
ReturnToMutFnLangItem, // 31
72+
CheckNotBorrowedFnLangItem, // 32
73+
StrDupUniqFnLangItem, // 33
74+
RecordBorrowFnLangItem, // 34
75+
UnrecordBorrowFnLangItem, // 35
76+
77+
StartFnLangItem, // 36
78+
79+
TyDescStructLangItem, // 37
80+
TyVisitorTraitLangItem, // 38
81+
OpaqueStructLangItem, // 39
8282
}
8383

8484
pub struct LanguageItems {
85-
items: [Option<DefId>, ..39]
85+
items: [Option<DefId>, ..41]
8686
}
8787

8888
impl LanguageItems {
8989
pub fn new() -> LanguageItems {
9090
LanguageItems {
91-
items: [ None, ..39 ]
91+
items: [ None, ..41 ]
9292
}
9393
}
9494

@@ -122,26 +122,27 @@ impl LanguageItems {
122122

123123
19 => "str_eq",
124124
20 => "uniq_str_eq",
125-
21 => "fail_",
126-
22 => "fail_bounds_check",
127-
23 => "exchange_malloc",
128-
24 => "closure_exchange_malloc",
129-
25 => "exchange_free",
130-
26 => "malloc",
131-
27 => "free",
132-
28 => "borrow_as_imm",
133-
29 => "borrow_as_mut",
134-
30 => "return_to_mut",
135-
31 => "check_not_borrowed",
136-
32 => "strdup_uniq",
137-
33 => "record_borrow",
138-
34 => "unrecord_borrow",
139-
140-
35 => "start",
141-
142-
36 => "ty_desc",
143-
37 => "ty_visitor",
144-
38 => "opaque",
125+
21 => "log_type",
126+
22 => "fail_",
127+
23 => "fail_bounds_check",
128+
24 => "exchange_malloc",
129+
25 => "closure_exchange_malloc",
130+
26 => "exchange_free",
131+
27 => "malloc",
132+
28 => "free",
133+
29 => "borrow_as_imm",
134+
30 => "borrow_as_mut",
135+
31 => "return_to_mut",
136+
32 => "check_not_borrowed",
137+
33 => "strdup_uniq",
138+
34 => "record_borrow",
139+
35 => "unrecord_borrow",
140+
141+
36 => "start",
142+
143+
37 => "ty_desc",
144+
38 => "ty_visitor",
145+
39 => "opaque",
145146

146147
_ => "???"
147148
}

branches/auto/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
26602660
foreign::register_foreign_item_fn(ccx, abis, &path, ni)
26612661
}
26622662
ast::foreign_item_static(*) => {
2663-
let ident = token::ident_to_str(&ni.ident);
2663+
let ident = foreign::link_name(ccx, ni);
26642664
let g = do ident.with_c_str |buf| {
26652665
unsafe {
26662666
let ty = type_of(ccx, ty);

branches/auto/src/librustc/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn version(argv0: &str) {
134134

135135
pub fn usage(argv0: &str) {
136136
let message = fmt!("Usage: %s [OPTIONS] INPUT", argv0);
137-
printfln!("%s\
137+
printfln!("%s\n\
138138
Additional help:
139139
-W help Print 'lint' options and default settings
140140
-Z help Print internal options for debugging rustc\n",

0 commit comments

Comments
 (0)