Skip to content

Commit 97772ee

Browse files
committed
---
yaml --- r: 126716 b: refs/heads/snap-stage3 c: 2ffccb7 h: refs/heads/master v: v3
1 parent 72f8967 commit 97772ee

File tree

122 files changed

+3505
-820
lines changed

Some content is hidden

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

122 files changed

+3505
-820
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 7be8f0af0393dcdb077c2f6b1653836fd3fba235
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 94500b84d4355e322efafc4f21c9d29ffc676826
4+
refs/heads/snap-stage3: 2ffccb76cea6acb1772fbbf6e78b7d7608d650f2
55
refs/heads/try: 502e4c045236682e9728539dc0d2b3d0b237f55c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ ifneq ($(strip $(findstring check,$(MAKECMDGOALS)) \
216216
$(findstring tidy,$(MAKECMDGOALS))),)
217217
CFG_INFO := $(info cfg: including test rules)
218218
include $(CFG_SRC_DIR)mk/tests.mk
219+
include $(CFG_SRC_DIR)mk/grammar.mk
219220
endif
220221

221222
# Performance and benchmarking

branches/snap-stage3/configure

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ probe CFG_VALGRIND valgrind
493493
probe CFG_PERF perf
494494
probe CFG_ISCC iscc
495495
probe CFG_LLNEXTGEN LLnextgen
496+
probe CFG_JAVAC javac
497+
probe CFG_ANTLR4 antlr4
498+
probe CFG_GRUN grun
496499
probe CFG_PANDOC pandoc
497500
probe CFG_PDFLATEX pdflatex
498501
probe CFG_XELATEX xelatex

branches/snap-stage3/mk/docs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ HTML_DEPS += doc/version_info.html
112112
doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
113113
$(wildcard $(D)/*.*) | doc/
114114
@$(call E, version-info: $@)
115-
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
116-
$(CFG_VER_HASH) | head -c 8)/;\
115+
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(\
116+
CFG_SHORT_VER_HASH)/;\
117117
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
118118

119119
GENERATED += doc/version.tex doc/version_info.html

branches/snap-stage3/mk/grammar.mk

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
# file at the top-level directory of this distribution and at
3+
# http://rust-lang.org/COPYRIGHT.
4+
#
5+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
# option. This file may not be copied, modified, or distributed
9+
# except according to those terms.
10+
11+
BG = $(CFG_BUILD_DIR)/grammar/
12+
SG = $(S)src/grammar/
13+
B = $(CFG_BUILD_DIR)/$(CFG_BUILD)/stage2/
14+
L = $(B)lib/rustlib/$(CFG_BUILD)/lib
15+
LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/
16+
RUSTC = $(B)bin/rustc
17+
18+
# Run the reference lexer against libsyntax and compare the tokens and spans.
19+
# If "// ignore-lexer-test" is present in the file, it will be ignored.
20+
#
21+
# $(1) is the file to test.
22+
define LEXER_TEST
23+
grep "// ignore-lexer-test" $(1) ; \
24+
if [ $$? -eq 1 ]; then \
25+
CLASSPATH=$(B)grammar $(CFG_GRUN) RustLexer tokens -tokens < $(1) \
26+
| $(B)grammar/verify $(1) ; \
27+
fi
28+
endef
29+
30+
$(BG):
31+
$(Q)mkdir -p $(BG)
32+
33+
$(BG)RustLexer.class: $(SG)RustLexer.g4
34+
$(Q)$(CFG_ANTLR4) -o $(B)grammar $(SG)RustLexer.g4
35+
$(Q)$(CFG_JAVAC) -d $(BG) $(BG)RustLexer.java
36+
37+
$(BG)verify: $(SG)verify.rs rustc-stage2-H-$(CFG_BUILD) $(LD)stamp.regex_macros $(LD)stamp.rustc
38+
$(Q)$(RUSTC) -O --out-dir $(BG) -L $(L) $(SG)verify.rs
39+
40+
check-lexer: $(BG) $(BG)RustLexer.class $(BG)verify
41+
ifdef CFG_JAVAC
42+
ifdef CFG_ANTLR4
43+
ifdef CFG_GRUN
44+
$(info Verifying libsyntax against the reference lexer ...)
45+
$(Q)$(SG)check.sh $(S) "$(BG)" \
46+
"$(CFG_GRUN)" "$(BG)verify" "$(BG)RustLexer.tokens"
47+
else
48+
$(info grun not available, skipping lexer test...)
49+
endif
50+
else
51+
$(info antlr4 not available, skipping lexer test...)
52+
endif
53+
else
54+
$(info javac not available, skipping lexer test...)
55+
endif

branches/snap-stage3/mk/main.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT))),)
4646
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
4747
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --pretty=format:'%ci')
4848
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
49-
CFG_VERSION += ($(CFG_VER_HASH) $(CFG_VER_DATE))
49+
CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD)
50+
CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE))
5051
endif
5152
endif
5253

branches/snap-stage3/mk/tests.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
192192
# NOTE: Remove after reprogramming windows bots
193193
check-fast: check-lite
194194

195+
check-syntax: check-lexer
196+
195197
.PHONY: cleantmptestlogs cleantestlibs
196198

197199
cleantmptestlogs:

0 commit comments

Comments
 (0)