GPR#324: Make boot/ocamlc read directly byterun/primitives (patch by Francois Bobot).

master
alainfrisch 2016-03-10 10:46:19 +01:00
parent 8eb9c0b46e
commit de857d6fb9
9 changed files with 21 additions and 9 deletions

11
Changes
View File

@ -1,3 +1,14 @@
OCaml 4.04.0:
-------------
(Changes that can break existing programs are marked with a "*")
Build system:
- GPR#324: Compiler developpers only: Adding new primitives to the
standard runtime doesn't require anymore to run `make bootstrap`
(François Bobot)
OCaml 4.03.0:
-------------

View File

@ -95,7 +95,7 @@ coldstart:
cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE)
cd yacc; $(MAKE) all
cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE)
cd stdlib; $(MAKE) COMPILER=../boot/ocamlc all
cd stdlib; $(MAKE) COMPILER="../boot/ocamlc -use-prims ../byterun/primitives" all
cd stdlib; cp $(LIBFILES) ../boot
if test -f boot/libcamlrun.a; then :; else \
ln -s ../byterun/libcamlrun.a boot/libcamlrun.a; fi

View File

@ -115,7 +115,7 @@ coldstart:
cp byterun/ocamlrun.exe boot/ocamlrun.exe
cd yacc ; $(MAKEREC) $(BOOT_FLEXLINK_CMD) all
cp yacc/ocamlyacc.exe boot/ocamlyacc.exe
cd stdlib ; $(MAKEREC) $(BOOT_FLEXLINK_CMD) COMPILER=../boot/ocamlc all
cd stdlib ; $(MAKEREC) $(BOOT_FLEXLINK_CMD) COMPILER="../boot/ocamlc -use-prims ../byterun/primitives" all
cd stdlib ; cp $(LIBFILES) ../boot
# Build the core system: the minimum needed to make depend and bootstrap

View File

@ -20,7 +20,7 @@ CAMLRUN ?= boot/ocamlrun
CAMLYACC ?= boot/ocamlyacc
include stdlib/StdlibModules
CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot
CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot -use-prims byterun/primitives
CAMLOPT=$(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
COMPFLAGS=-strict-sequence -principal -w +33..39+48+50 -warn-error A \
-bin-annot -safe-string -strict-formats $(INCLUDES)

View File

@ -41,7 +41,7 @@ PUBLIC_INCLUDES=\
version.h
all:: ocamlrun$(EXE) ld.conf libcamlrun.$(A) all-$(RUNTIMED)
all:: ocamlrun$(EXE) ld.conf libcamlrun.$(A) all-$(RUNTIMED) primitives
.PHONY: all
all-noruntimed:

View File

@ -18,7 +18,7 @@ include ../config/Makefile
CAMLRUN ?= ../boot/ocamlrun
CAMLYACC ?= ../boot/ocamlyacc
CAMLC=$(CAMLRUN) ../boot/ocamlc -strict-sequence -nostdlib -I ../boot
CAMLC=$(CAMLRUN) ../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives
CAMLOPT=$(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
COMPFLAGS=-w +33..39 -warn-error A -bin-annot -safe-string
LINKFLAGS=

View File

@ -19,7 +19,7 @@ include ../config/Makefile
CAMLRUN ?= ../boot/ocamlrun
CAMLYACC ?= ../boot/ocamlyacc
CAMLC=$(CAMLRUN) ../boot/ocamlc -I ../boot
CAMLC=$(CAMLRUN) ../boot/ocamlc -I ../boot -use-prims ../byterun/primitives
ifeq "$(wildcard ../flexdll/Makefile)" ""
FLEXLINK_ENV=
else

View File

@ -107,8 +107,9 @@ clean::
-p -c -o $*.p.cmx $<
# Dependencies on the compiler
$(OBJS) std_exit.cmo: $(COMPILER)
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
COMPILER_DEPS=$(filter-out -use-prims, $(COMPILER))
$(OBJS) std_exit.cmo: $(COMPILER_DEPS)
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER_DEPS)
$(OBJS:.cmo=.cmx) std_exit.cmx: $(OPTCOMPILER)
$(OBJS:.cmo=.p.cmx) std_exit.p.cmx: $(OPTCOMPILER)

View File

@ -17,7 +17,7 @@ include ../config/Makefile
CAMLRUN ?= ../boot/ocamlrun
CAMLYACC ?= ../boot/ocamlyacc
CAMLC=$(CAMLRUN) ../boot/ocamlc -nostdlib -I ../boot
CAMLC=$(CAMLRUN) ../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives
CAMLOPT=$(CAMLRUN) ../ocamlopt -nostdlib -I ../stdlib
CAMLLEX=$(CAMLRUN) ../boot/ocamllex
INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp \