diff options
author | Simon Brenner <olsner@gmail.com> | 2017-02-11 19:25:16 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-11 19:58:35 -0500 |
commit | a50082c115bed1891b2e5aac4a21462935f4f0d6 (patch) | |
tree | 4a348c54da987432d137687730b6eb2be4815344 /rules | |
parent | 6b4e46a1ad57f90726de7e5b7f59814aea5f03ef (diff) | |
download | haskell-a50082c115bed1891b2e5aac4a21462935f4f0d6.tar.gz |
Apply SplitSections to all C compilations
Previously this was added only to the RTS's C files (those are the bulk
of it though), but there are C bits in ghc-prim, integer-gmp and base
too.
Followup for #8405, allows the large table of character properties in
base to be stripped when not used.
Test Plan: validate
Reviewers: austin, bgamari, simonmar
Reviewed By: bgamari
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3121
Diffstat (limited to 'rules')
-rw-r--r-- | rules/distdir-way-opts.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk index 62a145162e..c4d716894c 100644 --- a/rules/distdir-way-opts.mk +++ b/rules/distdir-way-opts.mk @@ -190,7 +190,8 @@ $1_$2_$3_ALL_CC_OPTS = \ $$($1_$2_$3_CC_OPTS) \ $$($$(basename $$<)_CC_OPTS) \ $$($1_$2_EXTRA_CC_OPTS) \ - $$(EXTRA_CC_OPTS) + $$(EXTRA_CC_OPTS) \ + $$(if $$(findstring YES,$$($1_$2_SplitSections)),-ffunction-sections -fdata-sections) $1_$2_$3_GHC_CC_OPTS = \ $$(addprefix -optc, $$($1_$2_$3_ALL_CC_OPTS)) \ |