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

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 11:53:16 PDT 2019


rupprecht added a comment.

In D65255#1602062 <https://reviews.llvm.org/D65255#1602062>, @abrachet wrote:

> `git clang-format` does not understand moved files it turns out, so it formatted things that I didn't touch. I figure if this is going to happen it might as well be now, though. I can change this back though.


I think it's fine to clang format the whole thing (since git clang-format isn't smart enough), but ideally it'd be a separate patch that lands first, so that this just shows the changes required for moving directories



================
Comment at: llvm/lib/ObjectYAML/CMakeLists.txt:1
 add_llvm_library(LLVMObjectYAML
   CodeViewYAMLDebugSections.cpp
----------------
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&))                                                                

```


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

https://reviews.llvm.org/D65255





More information about the llvm-commits mailing list