This is an archive of the discontinued LLVM Phabricator instance.

llvm-config: Print system libraries with --libs instead of --ldflags
AbandonedPublic

Authored by chapuni on Dec 15 2013, 5:19 AM.

Details

Reviewers
None
Summary

Although I don't think it'd be *the right way* but more practical than ever.

In trunk, --ldflags prints out -L <dir> and system libs, for example -lpthread.
This behavior is useless and sometimes reported to bugs. (Seek llvm-config in bugs)

I suggest to print system libs after --libs. In fact, almost all system_libs are required from LLVMSupport.
Printing system libs at tail would satisfy most cases.

For example on mingw,

$ bin/llvm-config.exe --ldflags --libs object
-LX:/llvm_objroot/lib
-lLLVMObject -lLLVMSupport -limagehlp -lpsapi -lshell32

My patch affects neither --libnames and --libfiles.

Diff Detail

Event Timeline

Seems reasonable to me.

ddunbar resigned from this revision.Sep 1 2016, 8:21 PM
ddunbar removed a reviewer: ddunbar.
chapuni abandoned this revision.Nov 4 2016, 1:53 PM