Skip to content

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

Description

@dumblob

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 :(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions