Split FlexDLL bootstrap into flexdll and flexlink

Allows the C object files to be provided separately and just the
flexlink binary itself to be bootstrapped.
master
David Allsopp 2017-01-27 19:23:57 +01:00
parent 65fd726329
commit 5a29efa469
2 changed files with 20 additions and 6 deletions

View File

@ -714,6 +714,13 @@ Next minor version (4.04.1):
with constructors without arguments.
(Florian Angeletti, report by Xavier Leroy)
### Build system:
- PR#7373, GPR#1023: New flexlink target in Makefile.nt to bootstrap the
flexlink binary only, rather than the flexlink binary and the FlexDLL C
objects.
(David Allsopp)
### Bug fixes
- PR#7369: Str.regexp raises "Invalid_argument: index out of bounds"

View File

@ -296,7 +296,7 @@ ifeq "$(FLEXDLL_SUBMODULE_PRESENT)" ""
else
BOOT_FLEXLINK_CMD = FLEXLINK_CMD="../boot/ocamlrun ../flexdll/flexlink.exe"
CAMLOPT := OCAML_FLEXLINK="boot/ocamlrun flexdll/flexlink.exe" $(CAMLOPT)
FLEXDLL_DIR="+flexdll"
FLEXDLL_DIR=$(if $(wildcard flexdll/flexdll_*.$(O)),"+flexdll")
endif
else
FLEXDLL_DIR=
@ -556,9 +556,14 @@ flexdll/Makefile:
fi
@false
# Bootstrapping FlexDLL - leaves a bytecode image of flexlink.exe in flexdll/
.PHONY: flexdll
flexdll: flexdll/Makefile
flexdll: flexdll/Makefile flexlink
$(MAKE) -C flexdll MSVC_DETECT=0 CHAINS=$(FLEXDLL_CHAIN) NATDYNLINK=false \
support
# Bootstrapping flexlink - leaves a bytecode image of flexlink.exe in flexdll/
.PHONY: flexlink
flexlink: flexdll/Makefile
$(MAKE) -C byterun BOOTSTRAPPING_FLEXLINK=yes ocamlrun$(EXE)
cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE)
$(MAKE) -C stdlib COMPILER=../boot/ocamlc stdlib.cma std_exit.cmo
@ -566,7 +571,7 @@ flexdll: flexdll/Makefile
$(MAKE) -C flexdll MSVC_DETECT=0 TOOLCHAIN=$(TOOLCHAIN) \
TOOLPREF=$(TOOLPREF) CHAINS=$(FLEXDLL_CHAIN) NATDYNLINK=false \
OCAMLOPT="../boot/ocamlrun ../boot/ocamlc -I ../boot" \
flexlink.exe support
flexlink.exe
$(MAKE) -C byterun clean
$(MAKE) partialclean
@ -589,8 +594,10 @@ install-flexdll:
$(if $(filter-out mingw,$(TOOLCHAIN)),\
flexdll/default$(filter-out _i386,_$(ARCH)).manifest) \
"$(INSTALL_BINDIR)"
$(MKDIR) "$(INSTALL_FLEXDLL)"
cp flexdll/flexdll_*.$(O) "$(INSTALL_FLEXDLL)"
if test -n "$(wildcard flexdll/flexdll_*.$(O))" ; then \
$(MKDIR) "$(INSTALL_FLEXDLL)" ; \
cp flexdll/flexdll_*.$(O) "$(INSTALL_FLEXDLL)" ; \
fi
# Installation
.PHONY: install