File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,15 @@ function (gen_rst_file_from_td output_file td_option source docs_target)
100100 list (APPEND LLVM_TABLEGEN_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} /../../clang/include/clang/Driver/" )
101101 clang_tablegen(Source /${output_file} ${td_option} SOURCE ${source} TARGET "gen-${output_file} " )
102102 add_dependencies (${docs_target} "gen-${output_file} " )
103+
104+ # clang_tablegen() does not create the output directory automatically,
105+ # so we have to create it explicitly. Note that copy-flang-src-docs below
106+ # does create the output directory, but it is not necessarily run
107+ # before RST generation.
108+ add_custom_target (create-flang-rst-output -dir
109+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR} /Source
110+ )
111+ add_dependencies ("gen-${output_file} " create-flang-rst-output -dir)
103112endfunction ()
104113
105114if (LLVM_ENABLE_SPHINX)
You can’t perform that action at this time.
0 commit comments