[PATCH] D38379: Classify llvm-cfi-verify.

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 22:59:35 PDT 2017


skatkov added a comment.

I confirm that sub-directory traverse order is the reason of unittest compilation failure.
In good case llvm-cfi-verify is handled earlier than llvm-shlib while in bad case otherwise.

The traverse order depends on this command:

  file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*")

in function(llvm_add_implicit_projects project)

The following workaround 
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index b654b8c..da62e35 100644

- a/tools/CMakeLists.txt

+++ b/tools/CMakeLists.txt
@@ -47,6 +47,7 @@ add_llvm_external_project(llgo)
 add_llvm_external_project(lld)
 add_llvm_external_project(lldb)

+add_llvm_subdirectory(LLVM TOOL llvm-cfi-verify llvm-cfi-verify)

1. Automatically add remaining sub-directories containing a 'CMakeLists.txt'
2. file as external projects. add_llvm_implicit_projects()

fixes the issue for me because I force handling of CFIVerify earlier than LLVM shared library.

Please fix this asap, it really blocks me. I see three ways to fix it:

1. Move CFIVerify library to top-level lib directory
2. Find a way to prefer CFIVerify library to LLVM shared library
3. Revert the patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D38379





More information about the llvm-commits mailing list