diff --git a/flang/docs/CMakeLists.txt b/flang/docs/CMakeLists.txt --- a/flang/docs/CMakeLists.txt +++ b/flang/docs/CMakeLists.txt @@ -97,6 +97,7 @@ endif() get_filename_component(TABLEGEN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${source}" DIRECTORY) list(APPEND LLVM_TABLEGEN_FLAGS "-I${TABLEGEN_INCLUDE_DIR}") + list(APPEND LLVM_TABLEGEN_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/../../clang/include/clang/Driver/") clang_tablegen(Source/${output_file} ${td_option} SOURCE ${source} TARGET "gen-${output_file}") add_dependencies(${docs_target} "gen-${output_file}") endfunction() @@ -126,7 +127,7 @@ # CLANG_TABLEGEN_EXE variable needs to be set for clang_tablegen to run without error set(CLANG_TABLEGEN_EXE clang-tblgen) - gen_rst_file_from_td(FlangCommandLineReference.rst -gen-opt-docs ../include/flang/FlangOptionsDocs.td docs-flang-html) + gen_rst_file_from_td(FlangCommandLineReference.rst -gen-opt-docs FlangOptionsDocs.td docs-flang-html) endif() if (${SPHINX_OUTPUT_MAN}) add_sphinx_target(man flang) diff --git a/flang/include/flang/FlangOptionsDocs.td b/flang/docs/FlangOptionsDocs.td rename from flang/include/flang/FlangOptionsDocs.td rename to flang/docs/FlangOptionsDocs.td --- a/flang/include/flang/FlangOptionsDocs.td +++ b/flang/docs/FlangOptionsDocs.td @@ -26,10 +26,11 @@ string Program = "flang"; - list ExcludedFlags = []; + list ExcludedFlags = ["HelpHidden", "NoDriverOption", + "CLOption", "Unsupported", "Ignored"]; list IncludedFlags = ["FlangOption"]; } -include "../../../clang/include/clang/Driver/Options.td" +include "Options.td"