Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of linking flags needs to be changed for GCC in clangdao #2

Open
dumblob opened this issue Jan 26, 2015 · 0 comments
Open

Order of linking flags needs to be changed for GCC in clangdao #2

dumblob opened this issue Jan 26, 2015 · 0 comments

Comments

@dumblob
Copy link

dumblob commented Jan 26, 2015

Likely the same issue as described in https://code.google.com/p/include-what-you-use/issues/detail?id=92 . Right now it's needed to put -lclangEdit before -lclangLex to link with GCC under Linux.

@@ -44,9 +44,9 @@
 clangdao_exe.AddLinkingFlag( "-lclangSema" )
 clangdao_exe.AddLinkingFlag( "-lclangAnalysis" )
 clangdao_exe.AddLinkingFlag( "-lclangAST" )
+clangdao_exe.AddLinkingFlag( "-lclangEdit" )
 clangdao_exe.AddLinkingFlag( "-lclangLex" )
 clangdao_exe.AddLinkingFlag( "-lclangBasic" )
-clangdao_exe.AddLinkingFlag( "-lclangEdit" )
 clangdao_exe.AddLinkingFlag( "-lclangSerialization" )
 clangdao_exe.AddLinkingFlag( "-lclangStaticAnalyzerCheckers" )
 clangdao_exe.AddLinkingFlag( "-lclangStaticAnalyzerCore" )

Also, in my case I'm using LLVM 3.5.1 and Clang 3.5.1 and I need to add the whole output of llvm-config --libs after the linking flag -lclangStaticAnalyzerFrontend to link properly (otherwise symbols are missing etc.). According to my understanding, it has something to do with including symbols from clang (which in turn includes symbols from llvm) and llvm at the same time into one object file. I couldn't come up with better solution :(

@dumblob dumblob changed the title Order of linking flags needs to be changed for GCC Order of linking flags needs to be changed for GCC in clangdao Jan 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant