Consider the example command line below $ llvm-ld -disable-opt hello.bc -l std -o hello.out Why does -disable-opt links in all the bitcode from the libstd.so into hello.out? - Sanjiv
On Wed, Jul 15, 2009 at 9:32 AM, sanjiv gupta<sanjiv.gupta at microchip.com> wrote:> Consider the example command line below > > $ llvm-ld -disable-opt hello.bc -l std -o hello.out > > Why does -disable-opt links in all the bitcode from the libstd.so into > hello.out?... because it just disables optimization passed. It does not disable linking. ? - Devang
On Wed, 2009-07-15 at 10:37 -0700, Devang Patel wrote:> On Wed, Jul 15, 2009 at 9:32 AM, sanjiv gupta<sanjiv.gupta at microchip.com> wrote: > > Consider the example command line below > > > > $ llvm-ld -disable-opt hello.bc -l std -o hello.out > > > > Why does -disable-opt links in all the bitcode from the libstd.so into > > hello.out? > > ... because it just disables optimization passed. It does not disable linking. > ? > - > DevangIt should link in whatever is needed and not the whole lib. - Sanjiv> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Wed, 2009-07-15 at 10:37 -0700, Devang Patel wrote:> On Wed, Jul 15, 2009 at 9:32 AM, sanjiv gupta<sanjiv.gupta at microchip.com> wrote: > > Consider the example command line below > > > > $ llvm-ld -disable-opt hello.bc -l std -o hello.out > > > > Why does -disable-opt links in all the bitcode from the libstd.so into > > hello.out? > > ... because it just disables optimization passed. It does not disable linking. > ? > - > Devang > ______I think I did not explain the question really well. -disable-opt links the whole lib into the final program while not using -disable-opt links in only the required symbols. Why ? - Sanjiv> _________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev