r371205 - libclang depends on ClangDriverOptions since r352803

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 06:57:12 PDT 2019


Author: nico
Date: Fri Sep  6 06:57:12 2019
New Revision: 371205

URL: http://llvm.org/viewvc/llvm-project?rev=371205&view=rev
Log:
libclang depends on ClangDriverOptions since r352803

Without this, the build would sometimes fail with

    In file included from clang/tools/libclang/CIndexer.cpp:17:
    In file included from clang/include/clang/Driver/Driver.h:15:
    clang/include/clang/Driver/Options.h:44:10: fatal error:
        'clang/Driver/Options.inc' file not found
    #include "clang/Driver/Options.inc"
             ^~~~~~~~~~~~~~~~~

if Options.inc wasn't generated before libclang was built
by coincidence.

(In the GN build, this works because lib/Driver there declares
the dep on tablegen as a public_dep since the generated file
is part of Driver's public interface, and then things work out
automatically without every client of Driver having to be careful.)

Modified:
    cfe/trunk/tools/libclang/CMakeLists.txt

Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=371205&r1=371204&r2=371205&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Fri Sep  6 06:57:12 2019
@@ -97,7 +97,10 @@ endif()
 add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} INSTALL_WITH_TOOLCHAIN
   OUTPUT_NAME ${output_name}
   ${SOURCES}
-  DEPENDS clang-resource-headers
+
+  DEPENDS
+  ClangDriverOptions
+  clang-resource-headers
 
   LINK_LIBS
   ${LIBS}




More information about the cfe-commits mailing list