PengZheng opened a new issue, #442: URL: https://github.com/apache/celix/issues/442
I've implemented a C++ bundle named json_config, which depends on https://github.com/nlohmann/json and https://github.com/pboettch/json-schema-validator. It turns out that building using common settings will produce a 2.4M binary: ``` CFLAGS=-fdata-sections -ffunction-sections -Os CXXFLAGS=-fdata-sections -ffunction-sections -Os LDFLAGS=-Wl,--gc-sections ``` Further inspection reveals that a lot of C++ template instantiation unused is built into the final binary. Linking using the following linker script eliminated all these unused code from the binary, resulting in 300K binary, which is a huge win: ``` { global: celix_bundleActivator_create; celix_bundleActivator_start; celix_bundleActivator_stop; celix_bundleActivator_destroy; local: *; }; ``` I noticed that the original API design took symbol visibility into account, but the new celix API did not: https://github.com/apache/celix/blob/d8b1f33635d735de5f5ba2c986a37338803bfec5/libs/framework/include/framework.h#L34 Shall we add symbol visibility back to the whole Celix API? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org