HomePhabricator

[CMAKE] Add an option to reduce exports

Description

[CMAKE] Add an option to reduce exports

Summary:
Port of configure option --enable-reduce-exports.
This tries to reduce the amount of symbols which are exported in the
application binary.

Test Plan:

mkdir buildcmake && cd buildcmake
cmake -DENABLE_REDUCE_EXPORTS=OFF -GNinja ..
ninja
../contrib/devtools/symbol-check.py src/bitcoind | wc -l

Note the output of the last command.

rm -rf *
cmake -DENABLE_REDUCE_EXPORTS=ON -GNinja ..
ninja
../contrib/devtools/symbol-check.py src/bitcoind | wc -l

The quantity of line should be greatly reduced (244 => 123 on my
machine)

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D2965

Details

Provenance
FabienAuthored on Apr 30 2019, 15:16
FabienPushed on May 10 2019, 10:09
Reviewer
Restricted Project
Differential Revision
D2965: [CMAKE] Add an option to reduce exports
Parents
rSTAGINGb8be8d8e31ba: [backport PR12653] Allow to optional specify the directory for the blocks…
Branches
Unknown
Tags
Unknown