Check FUNCTION_SECTIONS in Makefile.common.in to update OPTCOMPFLAGS

master
Greta Yorsh 2020-04-06 15:45:50 +01:00
parent 7465e9f2c7
commit 44af4aea7c
6 changed files with 5 additions and 15 deletions

View File

@ -61,9 +61,7 @@ INCLUDES=-I utils -I parsing -I typing -I bytecomp -I file_formats \
COMPFLAGS=-strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 \
-warn-error A \
-bin-annot -safe-string -strict-formats $(INCLUDES)
ifeq "$(FUNCTION_SECTIONS)" "true"
OPTCOMPFLAGS += -function-sections
endif
LINKFLAGS=
ifeq "$(strip $(NATDYNLINKOPTS))" ""

View File

@ -67,6 +67,9 @@ else
endif
OPTCOMPFLAGS=
ifeq "$(FUNCTION_SECTIONS)" "true"
OPTCOMPFLAGS += -function-sections
endif
# By default, request ocamllex to be quiet
OCAMLLEX_FLAGS ?= -q

View File

@ -34,9 +34,6 @@ COMPFLAGS=-absname -w +a-4-9-41-42-44-45-48 -warn-error A -bin-annot -g \
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
ifeq "$(FUNCTION_SECTIONS)" "true"
OPTCOMPFLAGS += -function-sections
endif
MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib
# Variables that must be defined by individual libraries:

View File

@ -37,9 +37,6 @@ COMPFLAGS=-strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 \
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
ifeq "$(FUNCTION_SECTIONS)" "true"
OPTCOMPFLAGS += -function-sections
endif
COMPFLAGS += -I byte
OPTCOMPFLAGS += -I native

View File

@ -38,9 +38,6 @@ COMPFLAGS=-w +33..39 -warn-error A -g -bin-annot -safe-string
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
ifeq "$(FUNCTION_SECTIONS)" "true"
OPTCOMPFLAGS += -function-sections
endif
LIBNAME=threads

View File

@ -28,9 +28,7 @@ COMPFLAGS=-strict-sequence -absname -w +a-4-9-41-42-44-45-48 \
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
ifeq "$(FUNCTION_SECTIONS)" "true"
OPTCOMPFLAGS += -function-sections
endif
OPTCOMPILER=$(ROOTDIR)/ocamlopt
CAMLOPT=$(CAMLRUN) $(OPTCOMPILER)
CAMLDEP=$(BOOT_OCAMLC) -depend