parent
f7ba9367ec
commit
49ce3b0611
|
@ -158,6 +158,7 @@ config/gnu/config.guess text eol=lf
|
|||
config/gnu/config.sub text eol=lf
|
||||
ocamldoc/remove_DEBUG text eol=lf
|
||||
ocamltest/getocamloptdefaultflags text eol=lf
|
||||
stdlib/Compflags text eol=lf
|
||||
stdlib/sharpbang text eol=lf
|
||||
tools/ci/inria/remove-sinh-primitive.patch text eol=lf
|
||||
tools/check-typo text eol=lf
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
#**************************************************************************
|
||||
#* *
|
||||
#* OCaml *
|
||||
#* *
|
||||
#* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
|
||||
#* *
|
||||
#* Copyright 2004 Institut National de Recherche en Informatique et *
|
||||
#* en Automatique. *
|
||||
#* *
|
||||
#* All rights reserved. This file is distributed under the terms of *
|
||||
#* the GNU Lesser General Public License version 2.1, with the *
|
||||
#* special exception on linking described in the file LICENSE. *
|
||||
#* *
|
||||
#**************************************************************************
|
||||
|
||||
case $1 in
|
||||
stdlib.cm[iox])
|
||||
echo ' -nopervasives -no-alias-deps -w -49' \
|
||||
' -pp "$AWK -f expand_module_aliases.awk"';;
|
||||
camlinternalOO.cmx) echo ' -inline 0 -afl-inst-ratio 0';;
|
||||
camlinternalLazy.cmx) echo ' -afl-inst-ratio 0';;
|
||||
# never instrument camlinternalOO or camlinternalLazy (PR#7725)
|
||||
stdlib__buffer.cmx) echo ' -inline 3';;
|
||||
# make sure add_char is inlined (PR#5872)
|
||||
stdlib__buffer.cm[io]) echo ' -w A';;
|
||||
camlinternalFormat.cm[io]) echo ' -w Ae';;
|
||||
camlinternalFormatBasics*.cm[iox]) echo ' -nopervasives';;
|
||||
stdlib__printf.cm[io]|stdlib__format.cm[io]|stdlib__scanf.cm[io])
|
||||
echo ' -w Ae';;
|
||||
stdlib__scanf.cmx) echo ' -inline 9';;
|
||||
*Labels.cm[ox]) echo ' -nolabels -no-alias-deps';;
|
||||
stdlib__float.cm[ox]) echo ' -nolabels -no-alias-deps';;
|
||||
*) echo ' ';;
|
||||
esac
|
|
@ -35,57 +35,6 @@ CAMLOPT=$(CAMLRUN) $(OPTCOMPILER)
|
|||
CAMLDEP=$(BOOT_OCAMLC) -depend
|
||||
DEPFLAGS=-slash
|
||||
|
||||
quote := '
|
||||
AWKPP = $(quote)$(AWK) -f expand_module_aliases.awk$(quote)
|
||||
|
||||
# Module-specific compiler flags
|
||||
|
||||
# A few files in this directory need to be compiled with module-specific
|
||||
# compiler flags, which are defined in the MODCOMPFLAGS make variable.
|
||||
# This variable is defined to be empty by default and receives the
|
||||
# module-specific flags when appropriate.
|
||||
|
||||
MODCOMPFLAGS =
|
||||
|
||||
# The definitions of MODCOMPFLAGS take one of the two foollowing forms:
|
||||
# 1. target: MODCOMPFLAGS = flags means that MODCOMPFLAGS will have the
|
||||
# value "flags" when target is compiled and also when its prerequisites
|
||||
# are compiled as prerequisites of this target (if they are compiled
|
||||
# as prerequisites of another target, then the definition won't be taken
|
||||
# into account)
|
||||
# 2. target: private MODCOMPFLAGS = flags defines MODCOMPFLAGS to be
|
||||
# "flags" but only for the target itself, not for its prerequisites
|
||||
|
||||
# Here, "private" is used when a flag should be used to compile a
|
||||
# .cmo file but should not be passed when compiling the prerequisite
|
||||
# .cmi file.
|
||||
|
||||
stdlib.cmo stdlib.cmx: MODCOMPFLAGS = \
|
||||
-nopervasives -no-alias-deps -w -49 -pp $(AWKPP)
|
||||
|
||||
# never instrument camlinternalOO or camlinternalLazy (PR#7725)
|
||||
camlinternalOO.cmx: MODCOMPFLAGS = -inline 0 -afl-inst-ratio 0
|
||||
camlinternalLazy.cmx: MODCOMPFLAGS = -afl-inst-ratio 0
|
||||
|
||||
stdlib__buffer.cmx: MODCOMPFLAGS = -inline 3
|
||||
|
||||
stdlib__buffer.cmo: MODCOMPFLAGS = -w A
|
||||
|
||||
camlinternalFormat.cmo: MODCOMPFLAGS = -w Ae
|
||||
|
||||
camlinternalFormatBasics.cmo camlinternalFormatBasics.cmx: \
|
||||
MODCOMPFLAGS = -nopervasives
|
||||
|
||||
stdlib__printf.cmo stdlib__format.cmo \
|
||||
stdlib__scanf.cmo: MODCOMPFLAGS = -w Ae
|
||||
|
||||
stdlib__scanf.cmx: MODCOMPFLAGS = -inline 9
|
||||
|
||||
%Labels.cmo %Labels.cmx: private MODCOMPFLAGS = -nolabels -no-alias-deps
|
||||
|
||||
stdlib__float.cmo stdlib__float.cmx: \
|
||||
private MODCOMPFLAGS = -nolabels -no-alias-deps
|
||||
|
||||
OC_CPPFLAGS += -I$(ROOTDIR)/runtime
|
||||
|
||||
# Object file prefix
|
||||
|
@ -264,22 +213,23 @@ clean::
|
|||
export AWK
|
||||
|
||||
%.cmi: %.mli
|
||||
$(CAMLC) $(COMPFLAGS) $(MODCOMPFLAGS) -c $<
|
||||
$(CAMLC) $(COMPFLAGS) $(shell ./Compflags $@) -c $<
|
||||
|
||||
stdlib__%.cmi: %.mli
|
||||
$(CAMLC) $(COMPFLAGS) $(MODCOMPFLAGS) -o $@ -c $<
|
||||
$(CAMLC) $(COMPFLAGS) $(shell ./Compflags $@) -o $@ -c $<
|
||||
|
||||
%.cmo: %.ml
|
||||
$(CAMLC) $(COMPFLAGS) $(MODCOMPFLAGS) -c $<
|
||||
$(CAMLC) $(COMPFLAGS) $(shell ./Compflags $@) -c $<
|
||||
|
||||
stdlib__%.cmo: %.ml
|
||||
$(CAMLC) $(COMPFLAGS) $(MODCOMPFLAGS) -o $@ -c $<
|
||||
$(CAMLC) $(COMPFLAGS) $(shell ./Compflags $@) -o $@ -c $<
|
||||
|
||||
%.cmx: %.ml
|
||||
$(CAMLOPT) $(COMPFLAGS) $(OPTCOMPFLAGS) $(MODCOMPFLAGS) -c $<
|
||||
$(CAMLOPT) $(COMPFLAGS) $(OPTCOMPFLAGS) $(shell ./Compflags $@) -c $<
|
||||
|
||||
stdlib__%.cmx: %.ml
|
||||
$(CAMLOPT) $(COMPFLAGS) $(OPTCOMPFLAGS) $(MODCOMPFLAGS) -o $@ -c $<
|
||||
$(CAMLOPT) $(COMPFLAGS) $(OPTCOMPFLAGS) $(shell ./Compflags $@) \
|
||||
-o $@ -c $<
|
||||
|
||||
# Dependencies on the compiler
|
||||
COMPILER_DEPS=$(filter-out -use-prims $(CAMLRUN), $(CAMLC))
|
||||
|
|
Loading…
Reference in New Issue