Skip to content

Commit f8315f4

Browse files
committed
---
yaml --- r: 68863 b: refs/heads/auto c: fbc5bb4 h: refs/heads/master i: 68861: f1b4318 68859: 7091bc8 68855: e07f9e8 68847: 181cef8 68831: 9a13a2c 68799: 5565898 68735: 8f85650 68607: 70862b3 v: v3
1 parent a54340b commit f8315f4

File tree

5 files changed

+36
-2
lines changed

5 files changed

+36
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: e14cd392a4278223d858451a7b5cae327f76707c
17+
refs/heads/auto: fbc5bb4c0ae10ef159d1c06a40fdf2b7883083d3
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ do
731731
make_dir $h/test/perf
732732
make_dir $h/test/pretty
733733
make_dir $h/test/debug-info
734+
make_dir $h/test/codegen
734735
make_dir $h/test/doc-tutorial
735736
make_dir $h/test/doc-tutorial-ffi
736737
make_dir $h/test/doc-tutorial-macros

branches/auto/mk/tests.mk

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
246246
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
247247
check-stage$(1)-T-$(2)-H-$(3)-bench-exec \
248248
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-exec \
249+
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
249250
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
250251
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
251252

@@ -430,6 +431,8 @@ CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
430431
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
431432
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
432433
DEBUGINFO_RS := $(wildcard $(S)src/test/debug-info/*.rs)
434+
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
435+
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
433436

434437
# perf tests are the same as bench tests only they run under
435438
# a performance monitor.
@@ -443,6 +446,7 @@ BENCH_TESTS := $(BENCH_RS)
443446
PERF_TESTS := $(PERF_RS)
444447
PRETTY_TESTS := $(PRETTY_RS)
445448
DEBUGINFO_TESTS := $(DEBUGINFO_RS)
449+
CODEGEN_TESTS := $(CODEGEN_RS) $(CODEGEN_CC)
446450

447451
CTEST_SRC_BASE_rpass = run-pass
448452
CTEST_BUILD_BASE_rpass = run-pass
@@ -479,10 +483,19 @@ CTEST_BUILD_BASE_debuginfo = debug-info
479483
CTEST_MODE_debuginfo = debug-info
480484
CTEST_RUNTOOL_debuginfo = $(CTEST_RUNTOOL)
481485

486+
CTEST_SRC_BASE_codegen = codegen
487+
CTEST_BUILD_BASE_codegen = codegen
488+
CTEST_MODE_codegen = codegen
489+
CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
490+
482491
ifeq ($(CFG_GDB),)
483492
CTEST_DISABLE_debuginfo = "no gdb found"
484493
endif
485494

495+
ifeq ($(CFG_CLANG),)
496+
CTEST_DISABLE_codegen = "no clang found"
497+
endif
498+
486499
ifeq ($(CFG_OSTYPE),apple-darwin)
487500
CTEST_DISABLE_debuginfo = "gdb on darwing needs root"
488501
endif
@@ -507,6 +520,8 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
507520
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
508521
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
509522
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
523+
--clang-path $(if $(CFG_CLANG),$(CFG_CLANG),clang) \
524+
--llvm-bin-path $(CFG_LLVM_INST_DIR_$(CFG_BUILD_TRIPLE))/bin \
510525
--aux-base $$(S)src/test/auxiliary/ \
511526
--stage-id stage$(1)-$(2) \
512527
--target $(2) \
@@ -522,6 +537,7 @@ CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
522537
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
523538
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
524539
CTEST_DEPS_debuginfo_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_TESTS)
540+
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
525541

526542
endef
527543

@@ -565,7 +581,7 @@ endif
565581

566582
endef
567583

568-
CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo
584+
CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo codegen
569585

570586
$(foreach host,$(CFG_HOST_TRIPLES), \
571587
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
@@ -674,6 +690,7 @@ TEST_GROUPS = \
674690
bench \
675691
perf \
676692
debuginfo \
693+
codegen \
677694
doc \
678695
$(foreach docname,$(DOC_TEST_NAMES),doc-$(docname)) \
679696
pretty \
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <stddef.h>
2+
3+
struct slice {
4+
char const *p;
5+
size_t len;
6+
};
7+
8+
extern "C"
9+
void test() {
10+
struct slice s = { .p = "hello",
11+
.len = 5 };
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[no_mangle]
2+
fn test() {
3+
let _x = "hello";
4+
}

0 commit comments

Comments
 (0)