Commit 8f71d958 authored by olsner's avatar olsner Committed by Ben Gamari

Enable split sections by default where possible

On non-windows platforms with GNU ld, enable SplitSections in the GHC
build by default.

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: DemiMarie, thomie

Differential Revision:

GHC Trac Issues: #11445
parent 4026b452
......@@ -339,8 +339,12 @@ SupportsSplitObjs := $(strip \
$(filter NO,$(GhcUnregisterised))),\
# By default, enable SplitObjs for the libraries if this build supports it
# By default, enable SplitObjs for the libraries if this build supports it.
# Unless SplitSections is enabled - then let that take precedence.
SplitObjs = $(strip \
$(if $(and $(filter YES,$(SupportsSplitObjs)),\
$(filter NO,$(SplitSections))),\
# ----------------------------------------------------------------------------
# Section splitting
......@@ -349,9 +353,16 @@ SplitObjs=$(SupportsSplitObjs)
# like SplitObjs, but doesn't require post-processing and splitting of object
# files.
# Set SplitSections=YES in your to enable.
# Set SplitSections=YES or NO in your to override the default.
# This is not supported on Darwin (where you can use subsections-via-symbols
# instead) and Windows is not yet working. (See #11445 and related tickets.)
OsSupportsSplitSections=$(strip $(if $(filter $(TargetOS_CPP),mingw32 darwin),NO,YES))
SupportsSplitSections = $(strip \
$(if $(and $(filter YES,$(OsSupportsSplitSections)),\
$(filter YES,$(LdIsGNULd))),\
SplitSections ?= $(SupportsSplitSections)
# ----------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment