Skip to content

LLVM exports too many symbols (on Unix like systems like Linux and Mac) #19707

Open
@llvmbot

Description

@llvmbot
Bugzilla Link 19333
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @tstellar

Extended Description

This doesn't apply to Windows because by default symbols are hidden in DLLs. On Unix like systems like Linux and Mac though there are a bunch of symbols exported that shouldn't be which increase startup time. There is a long and annoying process of marking symbols to export for the libraries but for the executables (which obviously shouldn't export any symbols unless they have a plugin system) the flag -fvisibility=hidden should be a cheap and easy optimization. Note that LLVM does not use runtime type information or exceptions so I believe there shouldn't be very many problems however, according to http://gcc.gnu.org/wiki/Visibility there also some other cases (for example, static data members of templates that can cause this problem). Using #pragma push for one's own code could be one way of quickly accomplishing this.

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillacmakeBuild system in general and CMake in particular

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions