# Modified `clang/cutils/TableGen/clang_tablegen.gni` to suit the clspv build # structure. import("//build_overrides/clspv.gni") # This file introduces a template for running clang-tblgen. # # Parameters: # # args (required) # [list of strings] Flags to pass to clang-tblgen. # # output_name (optional) # Basename of the generated output file. # Defaults to target name with ".inc" appended. # # td_file (optional) # The .td file to pass to llvm-tblgen. # Defaults to target name with ".td" appended. # # visibility (optional) # GN's regular visibility attribute, see `gn help visibility`. # # Example of usage: # # clang_tablegen("DiagnosticGroups") { # args = [ "-gen-clang-diag-groups" ] # td_file = "Diagnostic.td" # } import("tablegen.gni") template("clang_tablegen") { tablegen(target_name) { forward_variables_from(invoker, [ "output_path", "output_name", "td_file", "visibility", ]) args = [ "-I", rebase_path("//$clspv_llvm_dir/clang/include", root_build_dir), ] + invoker.args tblgen_target = "../tools:clspv-tool-clang-tblgen" } }