Skip to content

Commit 594a443

Browse files
committed
---
yaml --- r: 140639 b: refs/heads/try2 c: dc48a55 h: refs/heads/master i: 140637: 535c30c 140635: e3b2218 140631: d670c2b 140623: 34301ce 140607: e720eaa v: v3
1 parent c3a0ebe commit 594a443

File tree

487 files changed

+8552
-20242
lines changed

Some content is hidden

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

487 files changed

+8552
-20242
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: 4757a58798516ad14a6f361f80b275496cb310b8
8+
refs/heads/try2: dc48a558b654795ac6326d75546ae49a1af959ab
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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ endif
101101

102102
ifdef CFG_ENABLE_DEBUG
103103
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
104-
CFG_RUSTC_FLAGS += --cfg debug
104+
CFG_RUSTC_FLAGS +=
105105
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
106106
else
107107
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG
@@ -110,9 +110,6 @@ endif
110110
ifdef SAVE_TEMPS
111111
CFG_RUSTC_FLAGS += --save-temps
112112
endif
113-
ifdef ASM_COMMENTS
114-
CFG_RUSTC_FLAGS += -z asm-comments
115-
endif
116113
ifdef TIME_PASSES
117114
CFG_RUSTC_FLAGS += -Z time-passes
118115
endif

branches/try2/configure

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,6 @@ then
439439
probe CFG_ZCAT zcat
440440
fi
441441

442-
step_msg "looking for target specific programs"
443-
444-
probe CFG_ADB adb
445-
446442
if [ ! -z "$CFG_PANDOC" ]
447443
then
448444
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |

branches/try2/doc/tutorial-ffi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pub struct Unique<T> {
157157
priv ptr: *mut T
158158
}
159159
160-
pub impl<T: Owned> Unique<T> {
160+
pub impl<'self, T: Owned> Unique<T> {
161161
fn new(value: T) -> Unique<T> {
162162
unsafe {
163163
let ptr = malloc(core::sys::size_of::<T>() as size_t) as *mut T;
@@ -168,14 +168,14 @@ pub impl<T: Owned> Unique<T> {
168168
}
169169
}
170170
171-
// the 'r lifetime results in the same semantics as `&*x` with ~T
172-
fn borrow<'r>(&'r self) -> &'r T {
173-
unsafe { cast::copy_lifetime(self, &*self.ptr) }
171+
// the 'self lifetime results in the same semantics as `&*x` with ~T
172+
fn borrow(&self) -> &'self T {
173+
unsafe { cast::transmute(self.ptr) }
174174
}
175175
176-
// the 'r lifetime results in the same semantics as `&mut *x` with ~T
177-
fn borrow_mut<'r>(&'r mut self) -> &'r mut T {
178-
unsafe { cast::copy_mut_lifetime(self, &mut *self.ptr) }
176+
// the 'self lifetime results in the same semantics as `&mut *x` with ~T
177+
fn borrow_mut(&mut self) -> &'self mut T {
178+
unsafe { cast::transmute(self.ptr) }
179179
}
180180
}
181181

branches/try2/mk/host.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ $$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)): \
130130
$$(HBIN$(2)_H_$(4))/:
131131
mkdir -p $$@
132132

133-
ifneq ($(CFG_LIBDIR),bin)
134133
$$(HLIB$(2)_H_$(4))/:
135134
mkdir -p $$@
136-
endif
137135

138136
endef
139137

branches/try2/mk/install.mk

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -154,76 +154,3 @@ uninstall:
154154
done
155155
$(Q)rm -Rf $(PHL)/rustc
156156
$(Q)rm -f $(PREFIX_ROOT)/share/man/man1/rustc.1
157-
158-
# target platform specific variables
159-
# for arm-linux-androidabi
160-
define DEF_ADB_DEVICE_STATUS
161-
CFG_ADB_DEVICE_STATUS=$(1)
162-
endef
163-
164-
$(foreach target,$(CFG_TARGET_TRIPLES), \
165-
$(if $(findstring $(target),"arm-linux-androideabi"), \
166-
$(if $(findstring adb,$(CFG_ADB)), \
167-
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
168-
$(info install: install-runtime-target for $(target) enabled \
169-
$(info install: android device attached) \
170-
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \
171-
$(info install: install-runtime-target for $(target) disabled \
172-
$(info install: android device not attached) \
173-
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
174-
), \
175-
$(info install: install-runtime-target for $(target) disabled \
176-
$(info install: adb not found) \
177-
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
178-
), \
179-
) \
180-
)
181-
182-
ifeq (install-runtime-target,$(firstword $(MAKECMDGOALS)))
183-
$(eval $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)):;@:)
184-
L_TOKEN := $(word 2,$(MAKECMDGOALS))
185-
ifeq ($(L_TOKEN),)
186-
CFG_RUNTIME_PUSH_DIR=/system/lib
187-
else
188-
CFG_RUNTIME_PUSH_DIR=$(L_TOKEN)
189-
endif
190-
191-
ifeq ($(CFG_ADB_DEVICE_STATUS),true)
192-
ifdef VERBOSE
193-
ADB = adb $(1)
194-
ADB_PUSH = adb push $(1) $(2)
195-
ADB_SHELL = adb shell $(1) $(2)
196-
else
197-
ADB = $(Q)$(call E, adb $(1)) && adb $(1) 1>/dev/null
198-
ADB_PUSH = $(Q)$(call E, adb push $(1)) && adb push $(1) $(2) 1>/dev/null
199-
ADB_SHELL = $(Q)$(call E, adb shell $(1) $(2)) && adb shell $(1) $(2) 1>/dev/null
200-
endif
201-
202-
define INSTALL_RUNTIME_TARGET_N
203-
install-runtime-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
204-
$(Q)$(call ADB_SHELL,mkdir,$(CFG_RUNTIME_PUSH_DIR))
205-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CFG_RUNTIME_$(1)),$(CFG_RUNTIME_PUSH_DIR))
206-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CORELIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
207-
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(STDLIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
208-
endef
209-
210-
define INSTALL_RUNTIME_TARGET_CLEANUP_N
211-
install-runtime-target-$(1)-cleanup:
212-
$(Q)$(call ADB,remount)
213-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CFG_RUNTIME_$(1)))
214-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CORELIB_GLOB_$(1)))
215-
$(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(STDLIB_GLOB_$(1)))
216-
endef
217-
218-
$(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD_TRIPLE)))
219-
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-androideabi))
220-
221-
install-runtime-target: \
222-
install-runtime-target-arm-linux-androideabi-cleanup \
223-
install-runtime-target-arm-linux-androideabi-host-$(CFG_BUILD_TRIPLE)
224-
else
225-
install-runtime-target:
226-
@echo "No device to install runtime library"
227-
@echo
228-
endif
229-
endif

branches/try2/mk/rt.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ endif
163163
ifdef CFG_WINDOWSY_$(1)
164164
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
165165
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
166+
CFLAGS="$$(CFG_GCCISH_CFLAGS)" \
167+
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS)" \
166168
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
167169
OS=mingw \
168170
V=$$(VERBOSE)

branches/try2/mk/target.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ endif
8686
$$(TBIN$(1)_T_$(2)_H_$(3))/:
8787
mkdir -p $$@
8888

89-
ifneq ($(CFG_LIBDIR),bin)
9089
$$(TLIB$(1)_T_$(2)_H_$(3))/:
9190
mkdir -p $$@
92-
endif
9391

9492
endef
9593

branches/try2/mk/tests.mk

Lines changed: 5 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -92,43 +92,6 @@ endef
9292
$(foreach target,$(CFG_TARGET_TRIPLES), \
9393
$(eval $(call DEF_TARGET_COMMANDS,$(target))))
9494

95-
# Target platform specific variables
96-
# for arm-linux-androidabi
97-
define DEF_ADB_DEVICE_STATUS
98-
CFG_ADB_DEVICE_STATUS=$(1)
99-
endef
100-
101-
$(foreach target,$(CFG_TARGET_TRIPLES), \
102-
$(if $(findstring $(target),"arm-linux-androideabi"), \
103-
$(if $(findstring adb,$(CFG_ADB)), \
104-
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
105-
$(info check: $(target) test enabled \
106-
$(info check: android device attached) \
107-
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \
108-
$(info check: $(target) test disabled \
109-
$(info check: android device not attached) \
110-
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
111-
), \
112-
$(info check: $(target) test disabled \
113-
$(info check: adb not found) \
114-
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
115-
), \
116-
) \
117-
)
118-
119-
ifeq ($(CFG_ADB_DEVICE_STATUS),true)
120-
CFG_ADB_TEST_DIR=/data/tmp
121-
122-
$(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
123-
$(shell adb remount 1>/dev/null) \
124-
$(shell adb shell mkdir $(CFG_ADB_TEST_DIR) 1>/dev/null) \
125-
$(shell adb push $(CFG_ANDROID_CROSS_PATH)/arm-linux-androideabi/lib/armv7-a/libgnustl_shared.so \
126-
$(CFG_ADB_TEST_DIR) 1>/dev/null) \
127-
)
128-
else
129-
CFG_ADB_TEST_DIR=
130-
endif
131-
13295

13396
######################################################################
13497
# Main test targets
@@ -356,53 +319,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
356319
&& touch $$@
357320
endef
358321

359-
define DEF_TEST_CRATE_RULES_arm-linux-androideabi
360-
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
361-
362-
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
363-
$(3)/test/$(4)test.stage$(1)-$(2)$$(X_$(2))
364-
@$$(call E, run: $$< via adb)
365-
@$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
366-
@$(CFG_ADB) shell LD_LIBRARY_PATH=$(CFG_ADB_TEST_DIR) \
367-
$(CFG_ADB_TEST_DIR)/`echo $$< | sed 's/.*\///'` \
368-
--logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log > \
369-
tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp
370-
@cat tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp
371-
@touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
372-
@$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/
373-
@$(CFG_ADB) shell rm $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
374-
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
375-
then \
376-
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
377-
touch $$@; \
378-
else \
379-
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
380-
exit 101; \
381-
fi
382-
endef
383-
384-
define DEF_TEST_CRATE_RULES_null
385-
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
386-
387-
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
388-
$(3)/test/$(4)test.stage$(1)-$(2)$$(X_$(2))
389-
@$$(call E, run: skipped $$< )
390-
@touch $$@
391-
endef
392-
393322
$(foreach host,$(CFG_HOST_TRIPLES), \
394323
$(foreach target,$(CFG_TARGET_TRIPLES), \
395324
$(foreach stage,$(STAGES), \
396325
$(foreach crate, $(TEST_CRATES), \
397-
$(if $(findstring $(target),$(CFG_BUILD_TRIPLE)), \
398-
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \
399-
$(if $(findstring $(target),"arm-linux-androideabi"), \
400-
$(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
401-
$(eval $(call DEF_TEST_CRATE_RULES_arm-linux-androideabi,$(stage),$(target),$(host),$(crate))), \
402-
$(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \
403-
), \
404-
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \
405-
))))))
326+
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate)))))))
406327

407328

408329
######################################################################
@@ -499,9 +420,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
499420
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
500421
--aux-base $$(S)src/test/auxiliary/ \
501422
--stage-id stage$(1)-$(2) \
502-
--target $(2) \
503-
--adb-path=$(CFG_ADB) \
504-
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
505423
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CFG_RUSTC_FLAGS) --target=$(2)" \
506424
$$(CTEST_TESTARGS)
507425

@@ -536,7 +454,7 @@ ifeq ($$(CTEST_DISABLE_$(4)),)
536454
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
537455
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
538456
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
539-
@$$(call E, run $(4) [$(2)]: $$<)
457+
@$$(call E, run $(4): $$<)
540458
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
541459
$$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
542460
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
@@ -547,7 +465,7 @@ else
547465
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
548466
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
549467
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
550-
@$$(call E, run $(4) [$(2)]: $$<)
468+
@$$(call E, run $(4): $$<)
551469
@$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4)))
552470
touch $$@
553471

@@ -588,7 +506,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
588506
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
589507
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
590508
$$(PRETTY_DEPS_$(4))
591-
@$$(call E, run pretty-rpass [$(2)]: $$<)
509+
@$$(call E, run pretty-rpass: $$<)
592510
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
593511
$$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
594512
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
@@ -615,7 +533,7 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3)
615533
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): \
616534
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
617535
doc-$(4)-extract$(3)
618-
@$$(call E, run doc-$(4) [$(2)]: $$<)
536+
@$$(call E, run doc-$(4): $$<)
619537
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
620538
$$(DOC_TEST_ARGS$(1)-T-$(2)-H-$(3)-doc-$(4)) \
621539
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),doc-$(4)) \

branches/try2/src/compiletest/common.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ pub struct config {
6464
// Run tests using the new runtime
6565
newrt: bool,
6666

67-
// Target system to be tested
68-
target: ~str,
69-
70-
// Extra parameter to run adb on arm-linux-androideabi
71-
adb_path: ~str,
72-
73-
// Extra parameter to run test sute on arm-linux-androideabi
74-
adb_test_dir: ~str,
75-
76-
// status whether android device available or not
77-
adb_device_status: bool,
78-
7967
// Explain what's going on
8068
verbose: bool
8169

branches/try2/src/compiletest/compiletest.rc

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ pub fn parse_config(args: ~[~str]) -> config {
6060
getopts::optflag(~"verbose"),
6161
getopts::optopt(~"logfile"),
6262
getopts::optflag(~"jit"),
63-
getopts::optflag(~"newrt"),
64-
getopts::optopt(~"target"),
65-
getopts::optopt(~"adb-path"),
66-
getopts::optopt(~"adb-test-dir")
67-
];
63+
getopts::optflag(~"newrt")];
6864

6965
assert!(!args.is_empty());
7066
let args_ = vec::tail(args);
@@ -97,18 +93,6 @@ pub fn parse_config(args: ~[~str]) -> config {
9793
rustcflags: getopts::opt_maybe_str(matches, ~"rustcflags"),
9894
jit: getopts::opt_present(matches, ~"jit"),
9995
newrt: getopts::opt_present(matches, ~"newrt"),
100-
target: opt_str(getopts::opt_maybe_str(matches, ~"target")),
101-
adb_path: opt_str(getopts::opt_maybe_str(matches, ~"adb-path")),
102-
adb_test_dir: opt_str(getopts::opt_maybe_str(matches, ~"adb-test-dir")),
103-
adb_device_status:
104-
if (opt_str(getopts::opt_maybe_str(matches, ~"target")) ==
105-
~"arm-linux-androideabi") {
106-
if (opt_str(getopts::opt_maybe_str(matches, ~"adb-test-dir")) !=
107-
~"(none)" &&
108-
opt_str(getopts::opt_maybe_str(matches, ~"adb-test-dir")) !=
109-
~"") { true }
110-
else { false }
111-
} else { false },
11296
verbose: getopts::opt_present(matches, ~"verbose")
11397
}
11498
}
@@ -129,10 +113,6 @@ pub fn log_config(config: config) {
129113
logv(c, fmt!("rustcflags: %s", opt_str(config.rustcflags)));
130114
logv(c, fmt!("jit: %b", config.jit));
131115
logv(c, fmt!("newrt: %b", config.newrt));
132-
logv(c, fmt!("target: %s", config.target));
133-
logv(c, fmt!("adb_path: %s", config.adb_path));
134-
logv(c, fmt!("adb_test_dir: %s", config.adb_test_dir));
135-
logv(c, fmt!("adb_device_status: %b", config.adb_device_status));
136116
logv(c, fmt!("verbose: %b", config.verbose));
137117
logv(c, fmt!("\n"));
138118
}

0 commit comments

Comments
 (0)