]> granicus.if.org Git - clang/commitdiff
libclang depends on ClangDriverOptions since r352803
authorNico Weber <nicolasweber@gmx.de>
Fri, 6 Sep 2019 13:57:12 +0000 (13:57 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 6 Sep 2019 13:57:12 +0000 (13:57 +0000)
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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371205 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CMakeLists.txt

index 613ead1a36b61b9a6f0f7cd0e8b12eafdf0722ed..9fd24ff463a32afd91edff81c282797cc2dccea4 100644 (file)
@@ -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}