LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 15543 - All binaries are linked with -rdynamic
Summary: All binaries are linked with -rdynamic
Status: RESOLVED FIXED
Alias: None
Product: Build scripts
Classification: Unclassified
Component: cmake (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-19 10:48 PDT by Rafael Ávila de Espíndola
Modified: 2013-04-03 20:03 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments
simple hack (389 bytes, patch)
2013-03-19 11:01 PDT, Rafael Ávila de Espíndola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Ávila de Espíndola 2013-03-19 10:48:22 PDT
For example:

ninja -v -j1  bin/llvm-as
[1/1] : && /usr/bin/ccache  /home/espindola/inst/clang/bin/clang++  -fcolor-diagnostics  -fPIC -fvisibility-inlines-hidden -Wcovered-switch-default -Wnon-virtual-dtor -fno-rtti -O3 -DNDEBUG   tools/llvm-as/CMakeFiles/llvm-as.dir/llvm-as.cpp.o  -o bin/llvm-as -rdynamic lib/libLLVMAsmParser.a lib/libLLVMBitWriter.a lib/libLLVMCore.a lib/libLLVMSupport.a -lrt -ldl -lpthread && :
Comment 1 Rafael Ávila de Espíndola 2013-03-19 11:01:19 PDT
Created attachment 10202 [details]
simple hack

This patch remove -rdynamic from *all* binaries. The impact in very noticeable. The bin directory on linux x86_64 on a Release+Asserts build goes from 254 MB to 239 MB.

The patch is just a hack as some binaries require -rdynamic. We need some way for each binary to say if it
* always needs -rdynamic (opt for example)
* doesn't need -rdynamic (llvm-as for example)
* it is an optional feature (clang is the only one I think)
Comment 2 Rafael Ávila de Espíndola 2013-04-03 20:03:57 PDT
Fixed in 178725.