mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-29 10:04:41 +01:00
3e672b784d
The linker discards whole files in an archive if it doesn't need them, so saves a bit of space (and time). Also allows us to add more niche things to CCAN (e.g. runes support!) without bloating all the binaries. We also had many places which depended on $(CCAN_FILES), but that was already a dependent of $(ALL_PROGRAMS) and $(ALL_TEST_PROGRAMS). Before: ``` $ size lightningd/lightning*d text data bss dec hex filename 2247683 8696 39008 2295387 23065b lightningd/lightning_channeld 2086607 7432 38880 2132919 208bb7 lightningd/lightning_closingd 2227916 8056 39200 2275172 22b764 lightningd/lightning_connectd 3369236 119288 39240 3527764 35d454 lightningd/lightningd 2183551 8352 38880 2230783 2209ff lightningd/lightning_dualopend 2196389 8024 39136 2243549 223bdd lightningd/lightning_gossipd 2086216 7488 39264 2132968 208be8 lightningd/lightning_hsmd 2134396 8136 39424 2181956 214b44 lightningd/lightning_onchaind 2133391 8352 38880 2180623 21460f lightningd/lightning_openingd 1512168 2136 34384 1548688 17a190 lightningd/lightning_websocketd ``` After: ``` text data bss dec hex filename 2192065 8488 38912 2239465 222be9 lightningd/lightning_channeld 2030957 7224 38816 2076997 1fb145 lightningd/lightning_closingd 2179571 7968 39104 2226643 21f9d3 lightningd/lightning_connectd 3354296 119288 39208 3512792 3599d8 lightningd/lightningd 2127933 8144 38816 2174893 212fad lightningd/lightning_dualopend 2141699 7856 39072 2188627 216553 lightningd/lightning_gossipd 2024482 7288 5240 2037010 1f1512 lightningd/lightning_hsmd 2072074 7920 5400 2085394 1fd212 lightningd/lightning_onchaind 2077773 8144 38816 2124733 206bbd lightningd/lightning_openingd 1408958 1752 344 1411054 1587ee lightningd/lightning_websocketd ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 lines
958 B
Makefile
16 lines
958 B
Makefile
PLUGIN_TESTLIBPLUGIN_SRC := tests/plugins/test_libplugin.c
|
|
PLUGIN_TESTLIBPLUGIN_OBJS := $(PLUGIN_TESTLIBPLUGIN_SRC:.c=.o)
|
|
|
|
tests/plugins/test_libplugin: bitcoin/chainparams.o $(PLUGIN_TESTLIBPLUGIN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
|
|
|
|
$(PLUGIN_TESTLIBPLUGIN_OBJS): $(PLUGIN_LIB_HEADER)
|
|
|
|
PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_SRC := tests/plugins/test_selfdisable_after_getmanifest.c
|
|
PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_OBJS := $(PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_SRC:.c=.o)
|
|
|
|
tests/plugins/test_selfdisable_after_getmanifest: bitcoin/chainparams.o $(PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_OBJS) common/autodata.o common/json_parse_simple.o common/setup.o common/utils.o $(JSMN_OBJS)
|
|
|
|
# Make sure these depend on everything.
|
|
ALL_TEST_PROGRAMS += tests/plugins/test_libplugin tests/plugins/test_selfdisable_after_getmanifest
|
|
ALL_C_SOURCES += $(PLUGIN_TESTLIBPLUGIN_SRC) $(PLUGIN_TESTSELFDISABLE_AFTER_GETMANIFEST_SRC)
|