#merge #static #tool #control #generate #visibility #hide #libraries

app armerge

Tool to merge and control visibility of static libraries

7 stable releases

new 1.1.5 Sep 17, 2020
1.1.4 Sep 9, 2020
1.1.2 Sep 7, 2020
1.1.1 Sep 3, 2020
1.0.0 Sep 2, 2020

#42 in Build Utils

32 downloads per month


563 lines


You can use armerge to combine multiple static libraries into a single merged ar archive.
Optionally, it is possible to generate a static archive containing a single merged object file, where all non-public symbols are localized (hidden).

This tool requires ranlib, ld, and objcopy installed on your host system.
On macOS, just libtool and ld are used instead.
You may specify a different linker using the LD environment variable, and a different objcopy implementation with OBJCOPY (for example, llvm-objcopy is much faster in some cases).

    armerge [FLAGS] [OPTIONS] --output <output> [--] [INPUTS]...

    -h, --help       Prints help information
    -V, --version    Prints version information
    -v, --verbose    Print verbose information

    -k, --keep-symbols <keep-symbols>...    Accepts regexes of the symbol names to keep global, and localizes the rest
    -o, --output <output>                   Output static library

    <INPUTS>...    Static libraries to merge


~132K SLoC