Skip to content

command-line argument parser provides too many options when building with --enable-shared #9232

@zygoloid

Description

@zygoloid
mannequin
Bugzilla Link 8860
Version trunk
OS Linux

Extended Description

Normal build (--disable-shared):

$ llvm-bcanalyzer -help | wc -l
10

Built with --enable-shared:

$ llvm-bcanalyzer -help | wc -l
113

The problem is that every static cl::opt<...> instance in the LLVM libraries is included in the LLVM .so, whereas static linking discards those which are in .o files which are (otherwise) unused.

I'm writing an external tool which uses some bits of LLVM (including the llvm::cl library), and can't use the LLVM dynamic library for this reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions