Skip to content

Commit 887348e

Browse files
committed
---
yaml --- r: 234810 b: refs/heads/tmp c: 6de473a h: refs/heads/master v: v3
1 parent 4eccfc5 commit 887348e

File tree

17 files changed

+14
-66
lines changed

17 files changed

+14
-66
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: f17cc4cf045dcb8e8fb3e2060eb0ec0681e6c08f
28+
refs/heads/tmp: 6de473addd874834fbd7fe42428564fc17159d81
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/src/compiletest/runtest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,8 @@ fn compile_test_and_save_ir(config: &Config, props: &TestProps,
16691669
// FIXME (#9639): This needs to handle non-utf8 paths
16701670
let mut link_args = vec!("-L".to_owned(),
16711671
aux_dir.to_str().unwrap().to_owned());
1672-
let llvm_args = vec!("--emit=llvm-ir".to_owned(),);
1672+
let llvm_args = vec!("--emit=llvm-ir".to_owned(),
1673+
"--crate-type=lib".to_owned());
16731674
link_args.extend(llvm_args);
16741675
let args = make_compile_args(config,
16751676
props,

branches/tmp/src/doc/trpl/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ string and add a flag to the Option variable. Once were done that, Getopts does
20642064
let mut opts = Options::new();
20652065
opts.optopt("f", "file", "Choose an input file, instead of using STDIN.", "NAME");
20662066
opts.optflag("h", "help", "Show this usage message.");
2067-
opts.optflag("q", "quit", "Silences errors and warnings.");
2067+
opts.optflag("q", "quiet", "Silences errors and warnings.");
20682068
...
20692069
```
20702070

branches/tmp/src/librustc_back/target/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ pub struct TargetOptions {
157157
/// Whether to disable linking to compiler-rt. Defaults to false, as LLVM
158158
/// will emit references to the functions that compiler-rt provides.
159159
pub no_compiler_rt: bool,
160-
/// Whether to disable linking to the default libraries, typically corresponds
161-
/// to `-nodefaultlibs`. Defaults to true.
162-
pub no_default_libraries: bool,
163160
/// Dynamically linked executables can be compiled as position independent
164161
/// if the default relocation model of position independent code is not
165162
/// changed. This is a requirement to take advantage of ASLR, as otherwise
@@ -215,7 +212,6 @@ impl Default for TargetOptions {
215212
linker_is_gnu: false,
216213
has_rpath: false,
217214
no_compiler_rt: false,
218-
no_default_libraries: true,
219215
position_independent_executables: false,
220216
pre_link_objects: Vec::new(),
221217
post_link_objects: Vec::new(),
@@ -323,7 +319,6 @@ impl Target {
323319
key!(linker_is_gnu, bool);
324320
key!(has_rpath, bool);
325321
key!(no_compiler_rt, bool);
326-
key!(no_default_libraries, bool);
327322
key!(pre_link_args, list);
328323
key!(post_link_args, list);
329324
key!(allow_asm, bool);

branches/tmp/src/librustc_back/target/windows_base.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ pub fn opts() -> TargetOptions {
2323
exe_suffix: ".exe".to_string(),
2424
staticlib_prefix: "".to_string(),
2525
staticlib_suffix: ".lib".to_string(),
26-
// Unfortunately right now passing -nodefaultlibs to gcc on windows
27-
// doesn't work so hot (in terms of native dependencies). This flag
28-
// should hopefully be removed one day though!
29-
no_default_libraries: false,
3026
is_like_windows: true,
3127
archive_format: "gnu".to_string(),
3228
pre_link_args: vec!(

branches/tmp/src/librustc_trans/back/link.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,9 +970,7 @@ fn link_args(cmd: &mut Linker,
970970
// default. Note that this does not happen for windows because windows pulls
971971
// in some large number of libraries and I couldn't quite figure out which
972972
// subset we wanted.
973-
if t.options.no_default_libraries {
974-
cmd.no_default_libraries();
975-
}
973+
cmd.no_default_libraries();
976974

977975
// Take careful note of the ordering of the arguments we pass to the linker
978976
// here. Linkers will assume that things on the left depend on things to the

branches/tmp/src/librustc_trans/back/linker.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ impl<'a> Linker for GnuLinker<'a> {
159159
}
160160

161161
fn no_default_libraries(&mut self) {
162-
self.cmd.arg("-nodefaultlibs");
162+
// Unfortunately right now passing -nodefaultlibs to gcc on windows
163+
// doesn't work so hot (in terms of native dependencies). This if
164+
// statement should hopefully be removed one day though!
165+
if !self.sess.target.target.options.is_like_windows {
166+
self.cmd.arg("-nodefaultlibs");
167+
}
163168
}
164169

165170
fn build_dylib(&mut self, out_filename: &Path) {

branches/tmp/src/librustc_trans/trans/debuginfo/gdb.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use llvm;
1414
use llvm::ValueRef;
1515

16-
use trans::common::{C_bytes, CrateContext, C_i32};
16+
use trans::common::{C_bytes, CrateContext};
1717
use trans::declare;
1818
use trans::type_::Type;
1919
use session::config::NoDebugInfo;
@@ -31,21 +31,11 @@ pub fn insert_reference_to_gdb_debug_scripts_section_global(ccx: &CrateContext)
3131
let gdb_debug_scripts_section_global =
3232
get_or_insert_gdb_debug_scripts_section_global(ccx);
3333
unsafe {
34-
// Load just the first byte as that's all that's necessary to force
35-
// LLVM to keep around the reference to the global.
36-
let indices = [C_i32(ccx, 0), C_i32(ccx, 0)];
37-
let element =
38-
llvm::LLVMBuildInBoundsGEP(ccx.raw_builder(),
39-
gdb_debug_scripts_section_global,
40-
indices.as_ptr(),
41-
indices.len() as ::libc::c_uint,
42-
empty.as_ptr());
4334
let volative_load_instruction =
4435
llvm::LLVMBuildLoad(ccx.raw_builder(),
45-
element,
36+
gdb_debug_scripts_section_global,
4637
empty.as_ptr());
4738
llvm::LLVMSetVolatile(volative_load_instruction, llvm::True);
48-
llvm::LLVMSetAlignment(volative_load_instruction, 1);
4939
}
5040
}
5141
}

branches/tmp/src/rt/hoedown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 4638c60dedfa581fd5fa7c6420d8f32274c9ca0b
1+
Subproject commit 8ff3d82f2dde2cead36402a59c62d3e266c2f6ec

branches/tmp/src/test/codegen/adjustments.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
14-
1513
// Hack to get the correct size for the length part in slices
1614
// CHECK: @helper([[USIZE:i[0-9]+]])
1715
#[no_mangle]

branches/tmp/src/test/codegen/coercions.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
14-
1513
static X: i32 = 5;
1614

1715
// CHECK-LABEL: @raw_ptr_to_raw_ptr_noop

branches/tmp/src/test/codegen/extern-functions.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
1413
#![feature(unwind_attributes)]
1514

1615
extern {

branches/tmp/src/test/codegen/function-arguments.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
1413
#![feature(allocator)]
1514

1615
pub struct S {

branches/tmp/src/test/codegen/gdb_debug_script_load.rs

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

branches/tmp/src/test/codegen/link_section.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
14-
1513
// CHECK: @VAR1 = constant i32 1, section ".test_one"
1614
#[no_mangle]
1715
#[link_section = ".test_one"]

branches/tmp/src/test/codegen/loads.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
14-
1513
pub struct Bytes {
1614
a: u8,
1715
b: u8,

branches/tmp/src/test/codegen/stores.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// compile-flags: -C no-prepopulate-passes
1212

13-
#![crate_type = "lib"]
14-
1513
pub struct Bytes {
1614
a: u8,
1715
b: u8,

0 commit comments

Comments
 (0)