Skip to content

Commit c40ed76

Browse files
committed
---
yaml --- r: 234813 b: refs/heads/tmp c: 2a6f6f2 h: refs/heads/master i: 234811: 0febeee v: v3
1 parent 6074556 commit c40ed76

File tree

7 files changed

+16
-10
lines changed

7 files changed

+16
-10
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: cf102966dedaccb62c6691adb589352d2bd2629f
28+
refs/heads/tmp: 2a6f6f26f4d4a1e22ea5e2b4498d3245d80e8aff
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/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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ 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,
160163
/// Dynamically linked executables can be compiled as position independent
161164
/// if the default relocation model of position independent code is not
162165
/// changed. This is a requirement to take advantage of ASLR, as otherwise
@@ -212,6 +215,7 @@ impl Default for TargetOptions {
212215
linker_is_gnu: false,
213216
has_rpath: false,
214217
no_compiler_rt: false,
218+
no_default_libraries: true,
215219
position_independent_executables: false,
216220
pre_link_objects: Vec::new(),
217221
post_link_objects: Vec::new(),
@@ -319,6 +323,7 @@ impl Target {
319323
key!(linker_is_gnu, bool);
320324
key!(has_rpath, bool);
321325
key!(no_compiler_rt, bool);
326+
key!(no_default_libraries, bool);
322327
key!(pre_link_args, list);
323328
key!(post_link_args, list);
324329
key!(allow_asm, bool);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ 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,
2630
is_like_windows: true,
2731
archive_format: "gnu".to_string(),
2832
pre_link_args: vec!(

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,9 @@ 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-
cmd.no_default_libraries();
973+
if t.options.no_default_libraries {
974+
cmd.no_default_libraries();
975+
}
974976

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

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

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

161161
fn no_default_libraries(&mut self) {
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-
}
162+
self.cmd.arg("-nodefaultlibs");
168163
}
169164

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

branches/tmp/src/rt/hoedown

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

0 commit comments

Comments
 (0)