Skip to content

Commit 047530f

Browse files
committed
---
yaml --- r: 82431 b: refs/heads/auto c: 133200a h: refs/heads/master i: 82429: 4f2ebf9 82427: 0d3682e 82423: e601c67 82415: 1735fe8 82399: b579efe 82367: 60d7ef7 82303: 776ade1 82175: 99e91a6 81919: 274cca6 v: v3
1 parent f65a1b0 commit 047530f

File tree

18 files changed

+153
-1094
lines changed

18 files changed

+153
-1094
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: cb7756a81d3cbc48e79ffaa1a1f9d4934b581166
16+
refs/heads/auto: 133200a6e293f6e74b14ddb6334fab11b13e0f46
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,11 +2442,6 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
24422442
unsafe {
24432443
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
24442444

2445-
let crate_map = ccx.crate_map;
2446-
let opaque_crate_map = do "crate_map".with_c_str |buf| {
2447-
llvm::LLVMBuildPointerCast(bld, crate_map, Type::i8p().to_ref(), buf)
2448-
};
2449-
24502445
let (start_fn, args) = if use_start_lang_item {
24512446
let start_def_id = match ccx.tcx.lang_items.require(StartFnLangItem) {
24522447
Ok(id) => id,
@@ -2469,8 +2464,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
24692464
C_null(Type::opaque_box(ccx).ptr_to()),
24702465
opaque_rust_main,
24712466
llvm::LLVMGetParam(llfn, 0),
2472-
llvm::LLVMGetParam(llfn, 1),
2473-
opaque_crate_map
2467+
llvm::LLVMGetParam(llfn, 1)
24742468
]
24752469
};
24762470
(start_fn, args)
@@ -2479,8 +2473,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
24792473
let args = ~[
24802474
C_null(Type::opaque_box(ccx).ptr_to()),
24812475
llvm::LLVMGetParam(llfn, 0 as c_uint),
2482-
llvm::LLVMGetParam(llfn, 1 as c_uint),
2483-
opaque_crate_map
2476+
llvm::LLVMGetParam(llfn, 1 as c_uint)
24842477
];
24852478

24862479
(rust_main, args)
@@ -2661,13 +2654,16 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
26612654
}
26622655
ast::foreign_item_static(*) => {
26632656
let ident = foreign::link_name(ccx, ni);
2664-
let g = do ident.with_c_str |buf| {
2665-
unsafe {
2657+
unsafe {
2658+
let g = do ident.with_c_str |buf| {
26662659
let ty = type_of(ccx, ty);
26672660
llvm::LLVMAddGlobal(ccx.llmod, ty.to_ref(), buf)
2661+
};
2662+
if attr::contains_name(ni.attrs, "weak_linkage") {
2663+
lib::llvm::SetLinkage(g, lib::llvm::ExternalWeakLinkage);
26682664
}
2669-
};
2670-
g
2665+
g
2666+
}
26712667
}
26722668
}
26732669
}

branches/auto/src/librustc/middle/typeck/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@ fn check_start_fn_ty(ccx: &CrateCtxt,
402402
bound_lifetime_names: opt_vec::Empty,
403403
inputs: ~[
404404
ty::mk_int(),
405-
ty::mk_imm_ptr(tcx, ty::mk_imm_ptr(tcx, ty::mk_u8())),
406-
ty::mk_imm_ptr(tcx, ty::mk_u8())
405+
ty::mk_imm_ptr(tcx, ty::mk_imm_ptr(tcx, ty::mk_u8()))
407406
],
408407
output: ty::mk_int()
409408
}

branches/auto/src/libstd/rt/crate_map.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ use vec;
1616
use hashmap::HashSet;
1717
use container::MutableSet;
1818

19-
pub struct ModEntry{
19+
extern {
20+
#[cfg(not(stage0))]
21+
#[weak_linkage]
22+
#[link_name = "_rust_crate_map_toplevel"]
23+
static CRATE_MAP: CrateMap;
24+
}
25+
26+
pub struct ModEntry {
2027
name: *c_char,
2128
log_level: *mut u32
2229
}
@@ -34,6 +41,11 @@ struct CrateMap {
3441
children: [*CrateMap, ..1]
3542
}
3643

44+
#[cfg(not(stage0))]
45+
pub fn get_crate_map() -> *CrateMap {
46+
&'static CRATE_MAP as *CrateMap
47+
}
48+
3749
unsafe fn version(crate_map: *CrateMap) -> i32 {
3850
match (*crate_map).version {
3951
1 => return 1,

branches/auto/src/libstd/rt/io/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ pub use self::net::ip::IpAddr;
260260
pub use self::net::tcp::TcpListener;
261261
pub use self::net::tcp::TcpStream;
262262
pub use self::net::udp::UdpStream;
263-
pub use self::pipe::PipeStream;
264-
pub use self::pipe::UnboundPipeStream;
265-
pub use self::process::Process;
266263

267264
// Some extension traits that all Readers and Writers get.
268265
pub use self::extensions::ReaderUtil;
@@ -272,12 +269,6 @@ pub use self::extensions::WriterByteConversions;
272269
/// Synchronous, non-blocking file I/O.
273270
pub mod file;
274271

275-
/// Synchronous, in-memory I/O.
276-
pub mod pipe;
277-
278-
/// Child process management.
279-
pub mod process;
280-
281272
/// Synchronous, non-blocking network I/O.
282273
pub mod net;
283274

branches/auto/src/libstd/rt/io/pipe.rs

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)