Skip to content

Commit

Permalink
Allow passing CAMLEXTRAFLAGS for standalone build (#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross authored Nov 12, 2023
1 parent f0c9395 commit 98356db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ else
CAMLOPT_PERF ?= $(OCAMLOPTP)
CAMLOPT_PERF_SHOW:=OCAMLOPTP
endif
CAMLEXTRAFLAGS ?=
STANDALONE_CAMLFLAGS ?= -package unix -w -20 -g $(CAMLEXTRAFLAGS)

PACKAGE ?= standalone.tar.gz
PACKAGE_CMD ?= tar -czvf
Expand All @@ -41,12 +43,12 @@ ENSURE_STACK_LIMIT := . etc/ensure_stack_limit.sh || true
$(STANDALONE_OCAML:%=src/ExtractionOCaml/%.cmi) : %.cmi : %.ml
$(SHOW)'$(CAMLOPT_PERF_SHOW) $*.mli'
$(HIDE)$(ENSURE_STACK_LIMIT); \
$(TIMER) $(CAMLOPT_PERF) -package unix -w -20 -g $*.mli
$(TIMER) $(CAMLOPT_PERF) $(STANDALONE_CAMLFLAGS) $*.mli

$(STANDALONE_OCAML:%=src/ExtractionOCaml/%) : % : %.ml %.cmi
$(SHOW)'$(CAMLOPT_PERF_SHOW) $< -o $@'
$(HIDE)$(ENSURE_STACK_LIMIT); \
$(TIMER) $(CAMLOPT_PERF) -package unix -linkpkg -w -20 -g -I src/ExtractionOCaml/ -o $@ $<
$(TIMER) $(CAMLOPT_PERF) $(STANDALONE_CAMLFLAGS) -linkpkg -I src/ExtractionOCaml/ -o $@ $<

$(STANDALONE_HASKELL:%=src/ExtractionHaskell/%) : % : %.hs
$(SHOW)'GHC $< -o $@'
Expand Down

0 comments on commit 98356db

Please sign in to comment.