Skip to content

Commit 0b1c420

Browse files
committed
---
yaml --- r: 148655 b: refs/heads/try2 c: 87004db h: refs/heads/master i: 148653: 2c60047 148651: a0fc1f1 148647: 6baa1d9 148639: fe3b860 v: v3
1 parent b12d711 commit 0b1c420

File tree

11 files changed

+37
-52
lines changed

11 files changed

+37
-52
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 93398d16ec816cd56eb5321d27ccbf46b9049815
8+
refs/heads/try2: 87004db1137c9126ecc8834b1c881c2ef09ee8ef
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ endif
124124
ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127-
ifdef DISABLE_RPATH
127+
ifdef CFG_DISABLE_RPATH
128128
# NOTE: make this CFG_RUSTC_FLAGS after stage0 snapshot
129129
RUSTFLAGS_STAGE1 += --no-rpath
130130
RUSTFLAGS_STAGE2 += --no-rpath

branches/try2/mk/install.mk

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,10 @@ install-target-$(1)-host-$(2): \
9393
$$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
9494
$$(Q)$$(call MK_INSTALL_DIR,$$(PTL$(1)$(2)))
9595
$$(Q)$$(foreach crate,$$(TARGET_CRATES),\
96-
$$(call INSTALL_LIB,$$(call CFG_LIB_GLOB_$(1),$$(crate)));
96+
$$(call INSTALL_LIB,$$(call CFG_LIB_GLOB_$(1),$$(crate)));\
9797
$$(call INSTALL_LIB,$$(call CFG_RLIB_GLOB,$$(crate)));)
9898
$$(Q)$$(call INSTALL_LIB,libmorestack.a)
9999

100-
install-target-$(1)-host-$(2)-prep:
101-
102-
install-target-$(1)-host-$(2)-morestack:
103-
104-
install-target-$(1)-host-$(2)-lib-%:
105-
install-target-$(1)-host-$(2)-rlib-%:
106-
107100
endef
108101

109102
define INSTALL_HOST_N
@@ -239,20 +232,17 @@ endif
239232

240233
define INSTALL_RUNTIME_TARGET_N
241234
install-runtime-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
242-
$(Q)$(call ADB_SHELL,mkdir,$(CFG_RUNTIME_PUSH_DIR))
243-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(STDLIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
244-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(EXTRALIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
245-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(LIBRUSTUV_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
246-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(LIBGREEN_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
235+
$$(Q)$$(call ADB_SHELL,mkdir,$(CFG_RUNTIME_PUSH_DIR))
236+
$$(Q)$$(foreach crate,$$(TARGET_CRATES),\
237+
$$(call ADB_PUSH,$$(TL$(1)$(2))/$$(call CFG_LIB_GLOB_$(1),$$(crate)),\
238+
$$(CFG_RUNTIME_PUSH_DIR));)
247239
endef
248240

249241
define INSTALL_RUNTIME_TARGET_CLEANUP_N
250242
install-runtime-target-$(1)-cleanup:
251-
$(Q)$(call ADB,remount)
252-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(STDLIB_GLOB_$(1)))
253-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(EXTRALIB_GLOB_$(1)))
254-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(LIBRUSTUV_GLOB_$(1)))
255-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(LIBGREEN_GLOB_$(1)))
243+
$$(Q)$$(call ADB,remount)
244+
$$(Q)$$(foreach crate,$$(TARGET_CRATES),\
245+
$$(call ADB_SHELL,rm,$$(CFG_RUNTIME_PUSH_DIR)/$$(call CFG_LIB_GLOB_$(1),$$(crate)));)
256246
endef
257247

258248
$(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD)))

branches/try2/mk/tests.mk

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,9 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
156156
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)) \
157157
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/tmp) \
158158
$(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \
159-
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(CFG_RUNTIME_arm-linux-androideabi) \
160-
$(CFG_ADB_TEST_DIR)) \
161-
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(STDLIB_GLOB_arm-linux-androideabi) \
162-
$(CFG_ADB_TEST_DIR)) \
163-
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(EXTRALIB_GLOB_arm-linux-androideabi) \
164-
$(CFG_ADB_TEST_DIR)) \
165-
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(LIBRUSTUV_GLOB_arm-linux-androideabi) \
166-
$(CFG_ADB_TEST_DIR)) \
167-
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(LIBGREEN_GLOB_arm-linux-androideabi) \
168-
$(CFG_ADB_TEST_DIR)) \
159+
$(foreach crate,$(TARGET_CRATES),\
160+
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_arm-linux-androideabi,$(crate)) \
161+
$(CFG_ADB_TEST_DIR)))\
169162
)
170163
else
171164
CFG_ADB_TEST_DIR=
@@ -342,10 +335,8 @@ define TEST_RUNNER
342335
# test crates without rebuilding std and extra first
343336
ifeq ($(NO_REBUILD),)
344337
STDTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
345-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.extra \
346-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustuv \
347-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green \
348-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.native
338+
$$(foreach crate,$$(TARGET_CRATES),\
339+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate))
349340
else
350341
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
351342
endif

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ fn compose_and_run_compiler(
700700
let abs_ab = config.aux_base.join(rel_ab.as_slice());
701701
let aux_props = load_props(&abs_ab);
702702
let aux_args =
703-
make_compile_args(config, &aux_props, ~[~"--lib"] + extra_link_args,
703+
make_compile_args(config, &aux_props, ~[~"--dylib"] + extra_link_args,
704704
|a,b| make_lib_name(a, b, testfile), &abs_ab);
705705
let auxres = compose_and_run(config, &abs_ab, aux_args, ~[],
706706
config.compile_lib_path, None);

branches/try2/src/librustc/driver/driver.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,14 +716,16 @@ pub fn build_session_options(binary: ~str,
716716
demitter: @diagnostic::Emitter)
717717
-> @session::Options {
718718
let mut outputs = ~[];
719+
if matches.opt_present("lib") {
720+
outputs.push(session::default_lib_output());
721+
}
719722
if matches.opt_present("rlib") {
720723
outputs.push(session::OutputRlib)
721724
}
722725
if matches.opt_present("staticlib") {
723726
outputs.push(session::OutputStaticlib)
724727
}
725-
// dynamic libraries are the "compiler blesssed" default library
726-
if matches.opt_present("dylib") || matches.opt_present("lib") {
728+
if matches.opt_present("dylib") {
727729
outputs.push(session::OutputDylib)
728730
}
729731
if matches.opt_present("bin") {

branches/try2/src/librustc/driver/session.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@ pub fn building_library(options: &Options, crate: &ast::Crate) -> bool {
422422
}
423423
}
424424

425+
pub fn default_lib_output() -> OutputStyle {
426+
OutputRlib
427+
}
428+
425429
pub fn collect_outputs(session: &Session,
426430
attrs: &[ast::Attribute]) -> ~[OutputStyle] {
427431
// If we're generating a test executable, then ignore all other output
@@ -435,7 +439,7 @@ pub fn collect_outputs(session: &Session,
435439
match a.value_str() {
436440
Some(n) if "rlib" == n => Some(OutputRlib),
437441
Some(n) if "dylib" == n => Some(OutputDylib),
438-
Some(n) if "lib" == n => Some(OutputDylib),
442+
Some(n) if "lib" == n => Some(default_lib_output()),
439443
Some(n) if "staticlib" == n => Some(OutputStaticlib),
440444
Some(n) if "bin" == n => Some(OutputExecutable),
441445
Some(_) => {

branches/try2/src/librustpkg/tests.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ fn lib_exists(repo: &Path, crate_id: &CrateId) -> bool {
353353
debug!("assert_lib_exists: checking whether {:?} exists", lib);
354354
lib.is_some() && {
355355
let libname = lib.get_ref();
356-
libname.exists() && is_rwx(libname)
356+
libname.exists()
357357
}
358358
}
359359

@@ -437,7 +437,7 @@ fn built_library_exists(repo: &Path, short_name: &str) -> bool {
437437
let lib = built_library_in_workspace(&crate_id, repo);
438438
lib.is_some() && {
439439
let libname = lib.get_ref();
440-
libname.exists() && is_rwx(libname)
440+
libname.exists()
441441
}
442442
}
443443

@@ -634,7 +634,6 @@ fn test_install_valid_external() {
634634
let lib = installed_library_in_workspace(&temp_pkg_id, temp_workspace);
635635
debug!("lib = {:?}", lib);
636636
assert!(lib.as_ref().map_or(false, |l| l.exists()));
637-
assert!(lib.as_ref().map_or(false, |l| is_rwx(l)));
638637

639638
// And that the test and bench executables aren't installed
640639
assert!(!target_test_in_workspace(&temp_pkg_id, temp_workspace).exists());
@@ -758,7 +757,8 @@ fn test_package_request_version() {
758757
Some(p) => {
759758
debug!("installed: {}", p.display());
760759
let suffix = format!("0.3{}", os::consts::DLL_SUFFIX);
761-
p.as_vec().ends_with(suffix.as_bytes())
760+
p.as_vec().ends_with(suffix.as_bytes()) ||
761+
p.as_vec().ends_with(bytes!("0.3.rlib"))
762762
}
763763
None => false
764764
});
@@ -2160,7 +2160,6 @@ fn test_installed_read_only() {
21602160
built_library_in_workspace(&temp_pkg_id,
21612161
&ws).expect("test_install_git: built lib should exist");
21622162
assert!(built_lib.exists());
2163-
assert!(is_rwx(&built_lib));
21642163
21652164
// Make sure sources are (a) under "build" and (b) read-only
21662165
let temp_dir = format!("{}-{}", temp_pkg_id.path, temp_pkg_id.version_or_default());

branches/try2/src/test/compile-fail/issue-3243.rs renamed to branches/try2/src/test/compile-fail/regions-return-stack-allocated-vec.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-test
12-
fn function() -> &mut [int] {
13-
let mut x: &'static mut [int] = &[1,2,3];
14-
x[0] = 12345;
15-
x //~ ERROR bad
11+
// Test that we cannot return a stack allocated slice
12+
13+
fn function(x: int) -> &'static [int] {
14+
&[x] //~ ERROR mismatched types
1615
}
1716

1817
fn main() {
19-
let x = function();
20-
error!("%?", x);
18+
let x = function(1);
19+
let y = x[0];
2120
}

branches/try2/src/test/run-make/bootstrap-from-c-with-green/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
#[crate_id="boot#0.1"];
12-
#[crate_type="lib"];
12+
#[crate_type="dylib"];
1313
#[no_uv];
1414

1515
extern mod rustuv;

branches/try2/src/test/run-make/bootstrap-from-c-with-native/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
#[crate_id="boot#0.1"];
12-
#[crate_type="lib"];
12+
#[crate_type="dylib"];
1313
#[no_uv];
1414

1515
extern mod native;

0 commit comments

Comments
 (0)