Closed
Bug 861425
Opened 11 years ago
Closed 10 years ago
Build clang static analyzer on Mac
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla32
People
(Reporter: ggp, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
3.86 KB,
patch
|
jcranmer
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Comment 1•11 years ago
|
||
Here's my attempt at making the clang plugin build on Mac. It's been tested under OSX 10.8.3 with clang trunk r179064, and also on Linux with clang 3.2 to try to catch any regressions. It seems like the clang included with XCode doesn't support plugins, so it is actually necessary to build it from source on OSX.
Attachment #737027 -
Flags: feedback?(Pidgeot18)
Comment 2•11 years ago
|
||
Can you try running this on the try servers as well?
Comment 3•11 years ago
|
||
Comment on attachment 737027 [details] [diff] [review] Build clang static analyzer on OSX Review of attachment 737027 [details] [diff] [review]: ----------------------------------------------------------------- ::: build/clang-plugin/Makefile.in @@ +9,2 @@ > VPATH := @srcdir@ > +PLUGIN := @plugin@ On the whole, I'd rather keep the variables we get from configure closer to the stuff found in config/autoconf.mk; instead of passing in a plugin flag, pass in DLL_SUFFIX and say PLUGIN := libclang-plugin.$(DLL_SUFFIX) CXXLIBFLAGS should probably be DSO_LDOPTS (although this needs to be different from Mozilla's DSO_LDOPTS eventally, I guess, since we don't want -Wl,-z,defs).
Attachment #737027 -
Flags: feedback?(Pidgeot18) → feedback+
Assignee | ||
Comment 4•10 years ago
|
||
Guilherme, are you still planning to work on this?
Flags: needinfo?(ggoncalves)
Assignee | ||
Comment 5•10 years ago
|
||
FWIW this fixes the build for me locally, I'd be glad to help get this landed.
Reporter | ||
Comment 6•10 years ago
|
||
(In reply to :Ehsan Akhgari (lagging on bugmail, needinfo? me!) from comment #4) > Guilherme, are you still planning to work on this? Not for the foreseeable future, sorry :/ I remember this did fix the build locally for me back then, but I never got a green try run with it. Perhaps things will work better now that it's been a year.
Flags: needinfo?(ggoncalves)
Assignee | ||
Comment 8•10 years ago
|
||
FWIW this doesn't build on Mac on try because we try to link against the 64-bit libraries during our x86 build pass of the universal build: ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMBitReader.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMMCParser.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMAsmParser.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMAnalysis.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMTarget.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMMC.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMObject.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMCore.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libLLVMSupport.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangFrontend.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangDriver.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangSerialization.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangParse.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangSema.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangAnalysis.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangEdit.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangAST.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangLex.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangBasic.a, file was built for archive which is not the architecture being linked (i386) ld: warning: ignoring file /builds/slave/try-osx64-00000000000000000000/build/clang/lib/libclangASTMatchers.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386: "clang::Type::getUnqualifiedDesugaredType() const", referenced from: clang::RecursiveASTVisitor<(anonymous namespace)::MozChecker>::TraverseType(clang::QualType) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::NonHeapClassChecker::run(clang::ast_matchers::MatchFinder::MatchResult const&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::NonHeapClassChecker::noteInferred(clang::QualType, clang::DiagnosticsEngine&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::StackClassChecker::run(clang::ast_matchers::MatchFinder::MatchResult const&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::StackClassChecker::noteInferred(clang::QualType, clang::DiagnosticsEngine&) in clang-plugin.o (anonymous namespace)::getClassAttrs(clang::CXXRecordDecl*) in clang-plugin.o clang::ast_matchers::internal::matcher_returns0Matcher::matches(clang::FunctionDecl const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in clang-plugin.o ... "clang::Type::getAsCXXRecordDecl() const", referenced from: clang::RecursiveASTVisitor<(anonymous namespace)::MozChecker>::WalkUpFromCXXRecordDecl(clang::CXXRecordDecl*) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::NonHeapClassChecker::noteInferred(clang::QualType, clang::DiagnosticsEngine&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::StackClassChecker::noteInferred(clang::QualType, clang::DiagnosticsEngine&) in clang-plugin.o (anonymous namespace)::getClassAttrs(clang::CXXRecordDecl*) in clang-plugin.o clang::ast_matchers::internal::matcher_stackClassAggregate0Matcher::matches(clang::QualType const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in clang-plugin.o clang::ast_matchers::internal::matcher_nonheapClassAggregate0Matcher::matches(clang::QualType const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in clang-plugin.o "clang::Decl::getAttrs() const", referenced from: clang::RecursiveASTVisitor<(anonymous namespace)::MozChecker>::WalkUpFromCXXRecordDecl(clang::CXXRecordDecl*) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::NonHeapClassChecker::run(clang::ast_matchers::MatchFinder::MatchResult const&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::NonHeapClassChecker::noteInferred(clang::QualType, clang::DiagnosticsEngine&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::StackClassChecker::run(clang::ast_matchers::MatchFinder::MatchResult const&) in clang-plugin.o (anonymous namespace)::DiagnosticsMatcher::StackClassChecker::noteInferred(clang::QualType, clang::DiagnosticsEngine&) in clang-plugin.o (anonymous namespace)::getClassAttrs(clang::CXXRecordDecl*) in clang-plugin.o clang::ast_matchers::internal::matcher_heapAllocator0Matcher::matches(clang::FunctionDecl const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in clang-plugin.o ...
Assignee | ||
Updated•10 years ago
|
Attachment #737027 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8427494 [details] [diff] [review] Build the clang plugin on Mac; r=jcranmer This is green on both Linux and OSX debug. It doesn't build on OSX opt because of the universal build issue, but we only need the debug to be green before we can turn this on on TBPL! \o/ https://tbpl.mozilla.org/?tree=Try&rev=c2e8d9108e9a
Attachment #8427494 -
Flags: review?(Pidgeot18)
Updated•10 years ago
|
Attachment #8427494 -
Flags: review?(Pidgeot18) → review+
Assignee | ||
Comment 11•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/288387f37b70
Comment 12•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/288387f37b70
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•