diff options
author | Wojciech Meyer <wojciech.meyer@gmail.com> | 2013-11-10 12:32:12 +0000 |
---|---|---|
committer | Wojciech Meyer <wojciech.meyer@gmail.com> | 2013-11-10 12:32:12 +0000 |
commit | 928503e9b8364c416e089adca8101b0680ee06d6 (patch) | |
tree | 862cc65aa22cc0c66d7ddbaf46e0fd331fc344e0 | |
parent | 7ea8f59082ce168d0d8efdad97cc4858d3765e1c (diff) | |
download | ocaml-928503e9b8364c416e089adca8101b0680ee06d6.tar.gz |
build: always build lex/ and ocamlc with the compiler from boot/.
(Patch by Adrien Nader!)
This is a partial revert of revision 14168 which caused issues when
bootstrapping the compiler. Since these directories don't take long to
build, we can always use a byte-compiled compiler.
Bootstrapping and more generally working on the compiler itself does not
play nice with trying to use the most recent compiler as soon as
possible: imagine you've just modified the compiler but in a way that
breaks it at runtime in a non-obvious way; all the files that are
subsequently built will have been built with your the compiler you will
be debugging.
v2: always build tools/ with boot/ocamlc since most executables link
against compiler libs.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14277 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | Makefile.nt | 4 | ||||
-rw-r--r-- | lex/Makefile | 4 | ||||
-rw-r--r-- | lex/Makefile.nt | 4 | ||||
-rw-r--r-- | tools/Makefile.shared | 4 |
5 files changed, 10 insertions, 10 deletions
@@ -15,7 +15,7 @@ include config/Makefile include stdlib/StdlibModules -CAMLC=$(CAMLC_BIN) -nostdlib -I boot +CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I stdlib -I otherlibs/dynlink COMPFLAGS=-strict-sequence -w +33..39 -warn-error A $(INCLUDES) LINKFLAGS= @@ -192,7 +192,7 @@ coldstart: cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE) cd yacc; $(MAKE) all cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE) - cd stdlib; $(MAKE) all + cd stdlib; $(MAKE) all CAMLC="../boot/ocamlrun ../boot/ocamlc -nostdlib -I ../boot" cd stdlib; cp $(LIBFILES) ../boot if test -f boot/libcamlrun.a; then :; else \ ln -s ../byterun/libcamlrun.a boot/libcamlrun.a; fi diff --git a/Makefile.nt b/Makefile.nt index 7aba8855f7..cee0b1ee19 100644 --- a/Makefile.nt +++ b/Makefile.nt @@ -15,7 +15,7 @@ include config/Makefile include stdlib/StdlibModules -CAMLC=$(CAMLC_BIN) -nostdlib -I boot +CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I stdlib -I otherlibs/dynlink COMPFLAGS=-strict-sequence -warn-error A $(INCLUDES) LINKFLAGS= @@ -153,7 +153,7 @@ coldstart: cp byterun/ocamlrun.exe boot/ocamlrun.exe cd yacc ; $(MAKEREC) all cp yacc/ocamlyacc.exe boot/ocamlyacc.exe - cd stdlib ; $(MAKEREC) all + cd stdlib ; $(MAKEREC) all CAMLC="../boot/ocamlrun ../boot/ocamlc -nostdlib -I ../boot" cd stdlib ; cp $(LIBFILES) ../boot # Build the core system: the minimum needed to make depend and bootstrap diff --git a/lex/Makefile b/lex/Makefile index f36d0d4a8d..6da5f0c576 100644 --- a/lex/Makefile +++ b/lex/Makefile @@ -14,8 +14,8 @@ include ../config/Makefile -CAMLC=$(CAMLC_BIN) -strict-sequence -nostdlib -I ../boot -CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../stdlib +CAMLC=../boot/ocamlrun ../boot/ocamlc -strict-sequence -nostdlib -I ../boot +CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib COMPFLAGS=-w +33..39 -warn-error A CAMLYACC=../boot/ocamlyacc YACCFLAGS=-v diff --git a/lex/Makefile.nt b/lex/Makefile.nt index cdf8d35d86..38c71f2e8a 100644 --- a/lex/Makefile.nt +++ b/lex/Makefile.nt @@ -14,8 +14,8 @@ include ../config/Makefile -CAMLC=$(CAMLC_BIN) -I ../boot -CAMLOPT=$(CAMLOPT_BIN) -I ../stdlib +CAMLC=../boot/ocamlrun ../boot/ocamlc -I ../boot +CAMLOPT=../boot/ocamlrun ../ocamlopt -I ../stdlib COMPFLAGS=-warn-error A LINKFLAGS= CAMLYACC=../boot/ocamlyacc diff --git a/tools/Makefile.shared b/tools/Makefile.shared index 76ed3c67e1..28ecac8288 100644 --- a/tools/Makefile.shared +++ b/tools/Makefile.shared @@ -12,8 +12,8 @@ include ../config/Makefile -CAMLC=$(CAMLC_BIN) -nostdlib -I ../boot -strict-sequence -CAMLOPT=$(CAMLOPT_BIN) -nostdlib -I ../stdlib +CAMLC=../boot/ocamlrun ../boot/ocamlc -strict-sequence -nostdlib -I ../boot +CAMLOPT=../boot/ocamlrun ../ocamlopt -nostdlib -I ../stdlib CAMLLEX=$(CAMLRUN) ../boot/ocamllex INCLUDES=-I ../utils -I ../parsing -I ../typing -I ../bytecomp -I ../asmcomp \ -I ../driver -I ../toplevel |