Skip to content

Commit 820a774

Browse files
committed
remove hints from Makefiles; use --ext context_pruning instead
1 parent 5b76568 commit 820a774

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

book/tutorial/Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ include Makefile.include
3232
# Definition of F* flags
3333
# ----------------------
3434

35-
FSTAR_HINTS ?= --use_hints --use_hint_hashes --record_hints
36-
3735
# This flag controls what gets extracted to OCaml. Generally, we don't extract
3836
# the FStar namespace since it's already extracted and packaged as the ocamlfind
3937
# package fstar.lib. Here, unlike in -bundle, +Spec matches both Spec and
@@ -51,10 +49,10 @@ FSTAR_EXTRACT = --extract 'OCaml:-* +Spec'
5149
# - --cache_checked_modules to rely on a pre-built ulib and krmllib
5250
# - --cache_dir, to avoid polluting our generated build artifacts outside o
5351

54-
FSTAR_NO_FLAGS = $(FSTAR_EXE) $(FSTAR_HINTS) \
52+
FSTAR_NO_FLAGS = $(FSTAR_EXE) --ext context_pruning \
5553
--odir obj --cache_checked_modules $(FSTAR_INCLUDES) --cmi \
5654
--already_cached 'Prims FStar LowStar C Spec.Loops TestLib WasmSupport' --warn_error '+241@247+285' \
57-
--cache_dir obj --hint_dir hints
55+
--cache_dir obj
5856

5957
# Initial dependency analysis
6058
# ---------------------------
@@ -92,9 +90,6 @@ FSTAR = $(FSTAR_NO_FLAGS) $(OTHERFLAGS)
9290

9391
# Creating these directories via a make rule, rather than rely on F* creating
9492
# them, as two calls to F* might race.
95-
hints:
96-
mkdir $@
97-
9893
obj:
9994
mkdir $@
10095

@@ -119,7 +114,7 @@ obj:
119114
# Note: F* will not change the mtime of a checked file if it is
120115
# up-to-date (checksum matches, file unchanged), but this will confuse
121116
# make and result in endless rebuilds. So, we touch that file.
122-
%.checked: | hints obj
117+
%.checked: | obj
123118
$(FSTAR) $< $(FSTAR_FLAGS) && touch -c $@
124119

125120
# Extraction

krmllib/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ UINT128_DIR = dist/uint128
2222
MINI_DIR = dist/minimal
2323

2424
#332 is turning abstract keyword usage into a fatal error
25-
FSTAR_OPTIONS += --record_hints --use_hints --odir $(EXTRACT_DIR) \
25+
FSTAR_OPTIONS += --ext context_pruning --odir $(EXTRACT_DIR) \
2626
--warn_error @332
2727
# --use_extracted_interfaces
2828

@@ -37,7 +37,6 @@ ifneq ($(RESOURCEMONITOR),)
3737
endif
3838

3939
FSTAR = $(RUNLIM) $(FSTAR_EXE) $(FSTAR_OPTIONS) --cache_checked_modules --cache_dir obj \
40-
--hint_dir hints \
4140
$(addprefix --include , $(INCLUDE_PATHS)) --cmi \
4241
--already_cached 'Prims FStar -FStar.Krml.Endianness LowStar -LowStar.Lib'
4342

test/Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ NEGATIVE = false
7070
WEB_DIR ?= web
7171
CACHE_DIR = .cache
7272
OUTPUT_DIR = .output
73-
HINTS_DIR = .hints
7473

7574
ifneq ($(CRYPTO),)
7675
INCLUDE_CRYPTO=--include $(CRYPTO)
@@ -79,7 +78,7 @@ FSTAR = $(FSTAR_EXE) --cache_checked_modules \
7978
--cache_dir $(CACHE_DIR) --odir $(OUTPUT_DIR) \
8079
--include hello-system --include ../krmllib/compat --include ../krmllib/obj \
8180
--include ../krmllib --include ../runtime \
82-
$(INCLUDE_CRYPTO) --include ../book --include ../book/notfslit --use_hints --record_hints \
81+
$(INCLUDE_CRYPTO) --include ../book --include ../book/notfslit --ext context_pruning \
8382
--already_cached 'Prims FStar C TestLib Spec.Loops -C.Compat -C.Nullity LowStar WasmSupport' \
8483
--trivial_pre_for_unannotated_effectful_fns false \
8584
--cmi --warn_error -274
@@ -109,11 +108,8 @@ endif
109108

110109
include .depend
111110

112-
$(HINTS_DIR):
113-
mkdir -p $@
114-
115-
$(CACHE_DIR)/%.checked: | .depend $(HINTS_DIR)
116-
$(FSTAR) $(OTHERFLAGS) --hint_file $(HINTS_DIR)/$*.hints $< && \
111+
$(CACHE_DIR)/%.checked: | .depend
112+
$(FSTAR) $(OTHERFLAGS) $< && \
117113
touch $@
118114

119115
$(OUTPUT_DIR)/%.krml: | .depend

0 commit comments

Comments
 (0)