Skip to content

Commit 0996766

Browse files
committed
auto merge of #14955 : alexcrichton/rust/rollup, r=alexcrichton
2 parents cc30abb + b9adb6c commit 0996766

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+777
-356
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ please do two things:
2020

2121
Pull requests will be treated as "review requests", and we will give
2222
feedback we expect to see corrected on
23-
[style](https://github.com/mozilla/rust/wiki/Note-style-guide) and
23+
[style](https://github.com/rust-lang/rust/wiki/Note-style-guide) and
2424
substance before pulling. Changes contributed via pull request should
2525
focus on a single issue at a time, like any other. We will not accept
2626
pull-requests that try to "sneak" unrelated changes in.
2727

2828
Normally, all pull requests must include regression tests (see
29-
[Note-testsuite](https://github.com/mozilla/rust/wiki/Note-testsuite))
29+
[Note-testsuite](https://github.com/rust-lang/rust/wiki/Note-testsuite))
3030
that test your change. Occasionally, a change will be very difficult
3131
to test for. In those cases, please include a note in your commit
3232
message explaining why.
@@ -41,4 +41,4 @@ example, if it's 2014, and you change a Rust file that was created in
4141
```
4242

4343
For more details, please refer to
44-
[Note-development-policy](https://github.com/mozilla/rust/wiki/Note-development-policy).
44+
[Note-development-policy](https://github.com/rust-lang/rust/wiki/Note-development-policy).

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
# This is hardly all there is to know of The Rust Build System's
9999
# mysteries. The tale continues on the wiki[1][2].
100100
#
101-
# [1]: https://github.com/mozilla/rust/wiki/Note-build-system
102-
# [2]: https://github.com/mozilla/rust/wiki/Note-testsuite
101+
# [1]: https://github.com/rust-lang/rust/wiki/Note-build-system
102+
# [2]: https://github.com/rust-lang/rust/wiki/Note-testsuite
103103
#
104104
# If you really feel like getting your hands dirty, then:
105105
#

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ documentation.
1414
1515
[installer]: http://www.rust-lang.org/install.html
1616
[tutorial]: http://doc.rust-lang.org/tutorial.html
17-
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
18-
[win-wiki]: https://github.com/mozilla/rust/wiki/Using-Rust-on-Windows
17+
[wiki-start]: https://github.com/rust-lang/rust/wiki/Note-getting-started-developing-Rust
18+
[win-wiki]: https://github.com/rust-lang/rust/wiki/Using-Rust-on-Windows
1919

2020
## Building from Source
2121

@@ -38,7 +38,7 @@ documentation.
3838

3939
Or to build from the [repo] do:
4040

41-
$ git clone https://github.com/mozilla/rust.git
41+
$ git clone https://github.com/rust-lang/rust.git
4242
$ cd rust
4343

4444
Now that you have Rust's source code, you can configure and build it:
@@ -58,7 +58,7 @@ documentation.
5858
3. Read the [tutorial].
5959
4. Enjoy!
6060

61-
[repo]: https://github.com/mozilla/rust
61+
[repo]: https://github.com/rust-lang/rust
6262
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
6363
[tutorial]: http://doc.rust-lang.org/tutorial.html
6464

@@ -83,7 +83,7 @@ swap, it will take a very long time to build.
8383

8484
There is a lot more documentation in the [wiki].
8585

86-
[wiki]: https://github.com/mozilla/rust/wiki
86+
[wiki]: https://github.com/rust-lang/rust/wiki
8787

8888
## License
8989

configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
421421
opt rpath 1 "build rpaths into rustc itself"
422422
opt nightly 0 "build nightly packages"
423423
opt verify-install 1 "verify installed binaries work"
424+
opt jemalloc 1 "build liballoc with jemalloc"
424425
valopt prefix "/usr/local" "set installation prefix"
425426
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
426427
valopt llvm-root "" "set LLVM root"
@@ -1167,6 +1168,7 @@ putvar CFG_MANDIR
11671168
putvar CFG_DISABLE_INJECT_STD_VERSION
11681169
putvar CFG_JEMALLOC_ROOT
11691170
putvar CFG_LIBUV_ROOT
1171+
putvar CFG_DISABLE_JEMALLOC
11701172

11711173
# Avoid spurious warnings from clang by feeding it original source on
11721174
# ccache-miss rather than preprocessed input.

man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ To build an executable with debug info:
184184
rustdoc
185185

186186
.SH "BUGS"
187-
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
187+
See <\fBhttps://github.com/rust-lang/rust/issues\fR> for issues.
188188

189189
.SH "AUTHOR"
190190
See \fBAUTHORS.txt\fR in the Rust source distribution.

man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The generated HTML can be viewed with any standard web browser.
8787
rustc
8888

8989
.SH "BUGS"
90-
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
90+
See <\fBhttps://github.com/rust-lang/rust/issues\fR> for issues.
9191

9292
.SH "AUTHOR"
9393
See \fBAUTHORS.txt\fR in the Rust source distribution.

mk/main.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ endef
360360
# contains spaces which confuse make.
361361
# * `LD_LIBRARY_PATH_ENV_HOSTDIR`: the entry to add to lookup path for the host
362362
# * `LD_LIBRARY_PATH_ENV_TARGETDIR`: the entry to add to lookup path for target
363-
#
363+
#
364364
# Below that, HOST_RPATH_VAR and TARGET_RPATH_VAR are defined in terms of the
365365
# above settings.
366-
#
366+
#
367367
define SREQ_CMDS
368368

369369
ifeq ($$(OSTYPE_$(3)),apple-darwin)
@@ -382,9 +382,9 @@ LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3) := \
382382
$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))
383383

384384
HOST_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
385-
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)):$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3))
385+
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3)):$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))
386386
TARGET_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
387-
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)):$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))
387+
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3)):$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))
388388

389389
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(HOST_RPATH_VAR$(1)_T_$(2)_H_$(3))
390390

mk/rt.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ $$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
306306
EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1)) $$(CFG_JEMALLOC_CFLAGS_$(1)) -g1"
307307
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
308308

309+
ifeq ($$(CFG_DISABLE_JEMALLOC),)
310+
RUSTFLAGS_alloc := --cfg jemalloc
309311
ifeq ($(1),$$(CFG_BUILD))
310312
ifneq ($$(CFG_JEMALLOC_ROOT),)
311313
$$(JEMALLOC_LIB_$(1)): $$(CFG_JEMALLOC_ROOT)/libjemalloc_pic.a
@@ -319,6 +321,10 @@ else
319321
$$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_LOCAL_$(1))
320322
$$(Q)cp $$< $$@
321323
endif
324+
else
325+
$$(JEMALLOC_LIB_$(1)): $$(MKFILE_DEPS)
326+
$$(Q)touch $$@
327+
endif
322328

323329
################################################################################
324330
# compiler-rt

mk/target.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8484
-L "$$(RT_OUTPUT_DIR_$(2))" \
8585
-L "$$(LLVM_LIBDIR_$(2))" \
8686
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
87+
$$(RUSTFLAGS_$(4)) \
8788
--out-dir $$(@D) $$<
8889
@touch $$@
8990
$$(call LIST_ALL_OLD_GLOB_MATCHES,\

mk/tests.mk

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ endif
9191
define DEF_TARGET_COMMANDS
9292

9393
ifdef CFG_UNIXY_$(1)
94-
CFG_RUN_TEST_$(1)=$$(call CFG_RUN_$(1),,$$(CFG_VALGRIND) $$(1))
94+
CFG_RUN_TEST_$(1)=$$(TARGET_RPATH_VAR$$(2)_T_$$(3)_H_$$(4)) \
95+
$$(call CFG_RUN_$(1),,$$(CFG_VALGRIND) $$(1))
9596
endif
9697

9798
ifdef CFG_WINDOWSY_$(1)
@@ -105,13 +106,13 @@ ifdef CFG_WINDOWSY_$(1)
105106
$$(if $$(findstring stage3,$$(1)), \
106107
stage3/$$(CFG_LIBDIR_RELATIVE), \
107108
)))))/rustlib/$$(CFG_BUILD)/lib
108-
CFG_RUN_TEST_$(1)=$$(call CFG_RUN_$(1),$$(call CFG_TESTLIB_$(1),$$(1),$$(3)),$$(1))
109+
CFG_RUN_TEST_$(1)=$$(call CFG_RUN_$(1),$$(call CFG_TESTLIB_$(1),$$(1),$$(4)),$$(1))
109110
endif
110111

111112
# Run the compiletest runner itself under valgrind
112113
ifdef CTEST_VALGRIND
113114
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
114-
$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(2),$$(3))
115+
$$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(3),$$(4))
115116
else
116117
CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
117118
$$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
@@ -375,7 +376,8 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
375376
@$$(call E, rustc: $$@)
376377
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
377378
-L "$$(RT_OUTPUT_DIR_$(2))" \
378-
-L "$$(LLVM_LIBDIR_$(2))"
379+
-L "$$(LLVM_LIBDIR_$(2))" \
380+
$$(RUSTFLAGS_$(4))
379381

380382
endef
381383

@@ -391,7 +393,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
391393
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
392394
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
393395
@$$(call E, run: $$<)
394-
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) $$(TESTARGS) \
396+
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(1),$(2),$(3)) $$(TESTARGS) \
395397
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
396398
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) \
397399
&& touch $$@

src/compiletest/procsrv.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,41 @@ use std::str;
1313
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
1414
use std::dynamic_lib::DynamicLibrary;
1515

16-
fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
17-
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};
18-
let mut aux_path = prog.to_string();
19-
aux_path.push_str(".libaux");
20-
16+
fn target_env(lib_path: &str, aux_path: Option<&str>) -> Vec<(String, String)> {
2117
// Need to be sure to put both the lib_path and the aux path in the dylib
2218
// search path for the child.
2319
let mut path = DynamicLibrary::search_path();
24-
path.insert(0, Path::new(aux_path));
20+
match aux_path {
21+
Some(p) => path.insert(0, Path::new(p)),
22+
None => {}
23+
}
2524
path.insert(0, Path::new(lib_path));
2625

2726
// Remove the previous dylib search path var
2827
let var = DynamicLibrary::envvar();
29-
let mut env: Vec<(String,String)> =
30-
os::env().move_iter().map(|(a,b)|(a.to_string(), b.to_string())).collect();
28+
let mut env: Vec<(String,String)> = os::env();
3129
match env.iter().position(|&(ref k, _)| k.as_slice() == var) {
3230
Some(i) => { env.remove(i); }
3331
None => {}
3432
}
3533

3634
// Add the new dylib search path var
3735
let newpath = DynamicLibrary::create_path(path.as_slice());
38-
env.push((var.to_string(),
39-
str::from_utf8(newpath.as_slice()).unwrap().to_string()));
36+
let newpath = str::from_utf8(newpath.as_slice()).unwrap().to_string();
37+
env.push((var.to_string(), newpath));
4038
return env;
4139
}
4240

4341
pub struct Result {pub status: ProcessExit, pub out: String, pub err: String}
4442

4543
pub fn run(lib_path: &str,
4644
prog: &str,
45+
aux_path: Option<&str>,
4746
args: &[String],
4847
env: Vec<(String, String)> ,
4948
input: Option<String>) -> Option<Result> {
5049

51-
let env = env.clone().append(target_env(lib_path, prog).as_slice());
50+
let env = env.clone().append(target_env(lib_path, aux_path).as_slice());
5251
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
5352
Ok(mut process) => {
5453
for input in input.iter() {
@@ -69,11 +68,12 @@ pub fn run(lib_path: &str,
6968

7069
pub fn run_background(lib_path: &str,
7170
prog: &str,
71+
aux_path: Option<&str>,
7272
args: &[String],
7373
env: Vec<(String, String)> ,
7474
input: Option<String>) -> Option<Process> {
7575

76-
let env = env.clone().append(target_env(lib_path, prog).as_slice());
76+
let env = env.clone().append(target_env(lib_path, aux_path).as_slice());
7777
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
7878
Ok(mut process) => {
7979
for input in input.iter() {

0 commit comments

Comments
 (0)