diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2019-07-28 11:36:38 +0200 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2019-10-12 10:23:29 +0200 |
commit | 879ddff59abe18d4929749d96cfbc90e73b872ef (patch) | |
tree | 6d4013a3c75209c894b4e620282ff072d347e6f8 | |
parent | 986745cbbc62181ae8d7ccf63d1287e106d80eec (diff) | |
download | ocaml-879ddff59abe18d4929749d96cfbc90e73b872ef.tar.gz |
otherlibs Makefiles: use ocaml{c,opt}.opt when available
On my machine, the sequential build time goes from 30s to 10s.
-rw-r--r-- | otherlibs/Makefile.otherlibs.common | 7 | ||||
-rw-r--r-- | otherlibs/dynlink/Makefile | 5 | ||||
-rw-r--r-- | otherlibs/systhreads/Makefile | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common index 45e810f97f..b800ca9184 100644 --- a/otherlibs/Makefile.otherlibs.common +++ b/otherlibs/Makefile.otherlibs.common @@ -18,12 +18,13 @@ ROOTDIR=../.. include $(ROOTDIR)/Makefile.config include $(ROOTDIR)/Makefile.common +include $(ROOTDIR)/Makefile.best_binaries CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun -CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib -CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \ - -I $(ROOTDIR)/stdlib +CAMLC := $(BEST_OCAMLC) -nostdlib -I $(ROOTDIR)/stdlib +CAMLOPT := $(BEST_OCAMLOPT) -nostdlib -I $(ROOTDIR)/stdlib + OC_CFLAGS += $(SHAREDLIB_CFLAGS) $(EXTRACFLAGS) OC_CPPFLAGS += -I$(ROOTDIR)/runtime diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile index 2e25139d3b..542e8b08d5 100644 --- a/otherlibs/dynlink/Makefile +++ b/otherlibs/dynlink/Makefile @@ -23,11 +23,12 @@ ROOTDIR = ../.. include $(ROOTDIR)/Makefile.config include $(ROOTDIR)/Makefile.common +include $(ROOTDIR)/Makefile.best_binaries CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun -OCAMLC = $(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib -I $(ROOTDIR)/stdlib -OCAMLOPT = $(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib -I $(ROOTDIR)/stdlib +OCAMLC=$(BEST_OCAMLC) -nostdlib -I $(ROOTDIR)/stdlib +OCAMLOPT=$(BEST_OCAMLOPT) -nostdlib -I $(ROOTDIR)/stdlib # COMPFLAGS should be in sync with the toplevel Makefile's COMPFLAGS. COMPFLAGS=-strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 \ diff --git a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile index da09d089c4..668fb4d19a 100644 --- a/otherlibs/systhreads/Makefile +++ b/otherlibs/systhreads/Makefile @@ -17,6 +17,7 @@ ROOTDIR=../.. include $(ROOTDIR)/Makefile.config include $(ROOTDIR)/Makefile.common +include $(ROOTDIR)/Makefile.best_binaries OC_CFLAGS += $(SHAREDLIB_CFLAGS) @@ -29,8 +30,9 @@ CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun LIBS = -nostdlib -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/$(UNIXLIB) -CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc $(LIBS) -CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt $(LIBS) +CAMLC=$(BEST_OCAMLC) $(LIBS) +CAMLOPT=$(BEST_OCAMLOPT) $(LIBS) + MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib COMPFLAGS=-w +33..39 -warn-error A -g -bin-annot -safe-string ifeq "$(FLAMBDA)" "true" |