Skip to content

Commit

Permalink
Update for new F* build and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mtzguido committed Jan 6, 2025
1 parent fee6cb3 commit dadb24e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ mustexist = \
$(call mustexist, FSTAR_EXE)
$(call mustexist, KRML_HOME)

FSTAR_ULIB := $(shell $(FSTAR_EXE) --locate_lib)
# Note: fstar.exe --locate_lib returns the $PREFIX/lib/fstar directory,
# which has ocaml files and much more. The fst/fstis are under a ulib/
# subdirectory. There is an fstar.include in $PREFIX/lib/fstar to
# include it, so most users do not need to know about ulib/, but we use
# it explicitly in these Makefiles (and the vale-depend tool is not
# aware of fstar.include).
FSTAR_ULIB := $(shell $(FSTAR_EXE) --locate_lib)/ulib

ifndef VALE_HOME
# assuming an Everest source tree
Expand All @@ -60,10 +66,12 @@ VALE_HOME := $(call sanitize_path,$(VALE_HOME))

include $(HACL_HOME)/Makefile.include

# $(FSTAR_ULIB)/.cache necessary for Vale
# $(FSTAR_ULIB)/.checked necessary for Vale. It must be the
# directory where all of the checked files for the F* library can be
# found (flat, no subdirs).
INCLUDES = \
$(ALL_HACL_DIRS) \
$(FSTAR_ULIB)/.cache \
$(FSTAR_ULIB)/.checked \
$(KRML_HOME)/krmllib/obj \
$(KRML_HOME)/krmllib

Expand Down Expand Up @@ -235,4 +243,4 @@ ALL_CMX_FILES = $(subst obj/Lib_Buffer.cmx,obj/Lib_Memzero0.cmx obj/Lib_Buffer.c
# Warning 26: unused variable
export OCAMLFIND_IGNORE_DUPS_IN="`ocamlc -where`/compiler-libs"
OCAMLOPT = $(FSTAR_EXE) --ocamlenv ocamlfind opt -package fstar.lib -linkpkg -thread -g -I $(HACL_HOME)/obj -w -8-20-26
OCAMLSHARED = $(FSTAR_EXE) --ocamlenv ocamlfind opt -shared -package fstar.lib -thread -g -I $(HACL_HOME)/obj -w -8-20-26
OCAMLSHARED = $(FSTAR_EXE) --ocamlenv ocamlfind opt -shared -package fstar.pluginlib -thread -g -I $(HACL_HOME)/obj -w -8-20-26

0 comments on commit dadb24e

Please sign in to comment.