[PATCH] D65255: [yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 00:30:24 PDT 2019


abrachet marked 2 inline comments as done.
abrachet added inline comments.


================
Comment at: llvm/lib/ObjectYAML/CMakeLists.txt:1
 add_llvm_library(LLVMObjectYAML
   CodeViewYAMLDebugSections.cpp
----------------
rupprecht wrote:
> This fails in a `-DBUILD_SHARED_LIBS=On` cmake build; I think you need to add a dep on MC here (or add `set(LLVM_LINK_COMPONENTS MC)`)
> 
> 
> ```
> FAILED: lib/libLLVMObjectYAML.so.10svn
> ...
> ld.lld: error: undefined symbol: llvm::StringTableBuilder::StringTableBuilder(llvm::StringTableBuilder::Kind, unsigned int)                                                                                       
> >>> referenced by ELFEmitter.cpp:104 (/usr/local/google/home/rupprecht/src/llvm-project/llvm/lib/ObjectYAML/ELFEmitter.cpp:104)                                                                                   
> >>>               lib/ObjectYAML/CMakeFiles/LLVMObjectYAML.dir/ELFEmitter.cpp.o:(llvm::yaml::yaml2elf(llvm::ELFYAML::Object&, llvm::raw_ostream&))                                                                
> 
> ```
I ended up having to add quite a few more libraries before it would link. Were you just getting the errors you showed here or more than this?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65255/new/

https://reviews.llvm.org/D65255





More information about the llvm-commits mailing list