Skip to content

Commit 301f4dc

Browse files
committed
Merge branch 'jocorell/update-gha' of github.com:awslabs/aws-dynamodb-encryption-dafny into jocorell/update-gha
2 parents 4e30de4 + 767a2ac commit 301f4dc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

SharedMakefile.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ LIBRARY_ROOT := $(PWD)
4545
# but still build everything in their local library directory.
4646
SMITHY_MODEL_ROOT := $(LIBRARY_ROOT)/Model
4747

48+
# Later versions of Dafny no longer default to adding "_Compile"
49+
# to the names of modules when translating.
50+
# Our target language code still assumes it does,
51+
# so IF the /compileSuffix option is available in our verion of Dafny
52+
# we need to provide it.
53+
COMPILE_SUFFIX_OPTION_CHECK_EXIT_CODE := $(shell dafny /help | grep -q /compileSuffix; echo $$?)
54+
ifeq ($(COMPILE_SUFFIX_OPTION_CHECK_EXIT_CODE), 0)
55+
COMPILE_SUFFIX_OPTION := -compileSuffix:1
56+
else
57+
COMPILE_SUFFIX_OPTION :=
58+
endif
59+
4860
########################## Dafny targets
4961

5062
# Verify the entire project
@@ -152,6 +164,7 @@ transpile_implementation:
152164
-spillTargetCode:3 \
153165
-compile:0 \
154166
-optimizeErasableDatatypeWrapper:0 \
167+
$(COMPILE_SUFFIX_OPTION) \
155168
-quantifierSyntax:3 \
156169
-unicodeChar:0 \
157170
-functionSyntax:3 \
@@ -174,6 +187,7 @@ transpile_test:
174187
-runAllTests:1 \
175188
-compile:0 \
176189
-optimizeErasableDatatypeWrapper:0 \
190+
$(COMPILE_SUFFIX_OPTION) \
177191
-quantifierSyntax:3 \
178192
-unicodeChar:0 \
179193
-functionSyntax:3 \

0 commit comments

Comments
 (0)