Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Provide -compileSuffix to dafny when available #280

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions TestModels/SharedMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ PROJECT_RELATIVE_ROOT := $(dir $(lastword $(MAKEFILE_LIST)))
# i.e. The specific library under consideration.
LIBRARY_ROOT = $(PWD)

# Later versions of Dafny no longer default to adding "_Compile"
# to the names of modules when translating.
# Our target language code still assumes it does,
# so IF the /compileSuffix option is available in our verion of Dafny
# we need to provide it.
COMPILE_SUFFIX_OPTION_CHECK_EXIT_CODE := $(shell dafny /help | grep -q /compileSuffix; echo $$?)
ifeq ($(COMPILE_SUFFIX_OPTION_CHECK_EXIT_CODE), 0)
COMPILE_SUFFIX_OPTION := -compileSuffix:1
else
COMPILE_SUFFIX_OPTION :=
endif

STANDARD_LIBRARY_PATH := $(PROJECT_ROOT)/dafny-dependencies/StandardLibrary
CODEGEN_CLI_ROOT := $(PROJECT_ROOT)/../codegen/smithy-dafny-codegen-cli
GRADLEW := $(PROJECT_ROOT)/../codegen/gradlew
Expand Down Expand Up @@ -92,6 +104,7 @@ transpile_implementation:
-spillTargetCode:3 \
-compile:0 \
-optimizeErasableDatatypeWrapper:0 \
$(COMPILE_SUFFIX_OPTION) \
-quantifierSyntax:3 \
-unicodeChar:0 \
-functionSyntax:3 \
Expand All @@ -109,6 +122,7 @@ transpile_test:
-runAllTests:1 \
-compile:0 \
-optimizeErasableDatatypeWrapper:0 \
$(COMPILE_SUFFIX_OPTION) \
-quantifierSyntax:3 \
-unicodeChar:0 \
-functionSyntax:3 \
Expand Down
Loading