[cfe-dev] Build error for Release+Asserts with a clean repo from clang

Manman Ren mren at apple.com
Sun Jul 29 10:46:46 PDT 2012

I started seeing this a few days back, it is probably related to my setup.

Debug+Asserts builds fine.
But for Release+Asserts, I got:
Undefined symbols for architecture x86_64:
  "clang::Decl::dump() const", referenced from:
      clang::ASTContext::DumpRecordLayout(clang::RecordDecl const*, llvm::raw_ostream&, bool) const in libclangAST.a(RecordLayoutBuilder.o)
      clang::arcmt::trans::MigrationContext::dumpGCAttrs() in libclangARCMigrate.a(TransGCAttrs.o)
      clang::CodeGen::CodeGenTypes::ComputeRecordLayout(clang::RecordDecl const*, llvm::StructType*) in libclangCodeGen.a(CGRecordLayoutBuilder.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea how to fix this?


More information about the cfe-dev mailing list