Files
RedBear-OS/local/recipes/dev/libclc/source/llvm/tools/llvm-cgdata/Opts.td
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

34 lines
1.9 KiB
TableGen

include "llvm/Option/OptParser.td"
class F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
class FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
// General options
def generic_group : OptionGroup<"Genric Options">, HelpText<"Generic Options">;
def help : FF<"help", "Display this help">, Group<generic_group>;
def : F<"h", "Alias for --help">, Alias<help>, Group<generic_group>;
def version : FF<"version", "Display the LLVM version">, Group<generic_group>;
def : F<"v", "Alias for --version">, Alias<version>, Group<generic_group>;
// Action options
def action_group : OptionGroup<"Action">, HelpText<"Action (required)">;
def show : FF<"show", "Show summary of the (indexed) codegen data file.">,
Group<action_group>;
def : F<"s", "Alias for --show">, Alias<show>, Group<action_group>;
def convert : FF<"convert", "Convert the (indexed) codegen data file in either text or binary format.">,
Group<action_group>;
def : F<"c", "Alias for --convert">, Alias<convert>, Group<action_group>;
def merge : FF<"merge", "Take binary files having raw codegen data in custom sections, and merge them into an indexed codegen data file.">,
Group<action_group>;
def : F<"m", "Alias for --merge">, Alias<merge>, Group<action_group>;
// Additional options
def cgdata_version : FF<"cgdata-version", "Display the cgdata version">;
def skip_trim : FF<"skip-trim", "Skip trimming content when merging the cgdata">;
def output : Option<["--"], "output", KIND_SEPARATE>,
HelpText<"Specify the name for the output file to be created">, MetaVarName<"<file>">;
def : JoinedOrSeparate<["-"], "o">, Alias<output>, MetaVarName<"<file>">, HelpText<"Alias for --output">;
def format : Option<["--"], "format", KIND_SEPARATE>,
HelpText<"Specify the output format (text or binary)">, MetaVarName<"<value>">;
def : JoinedOrSeparate<["-"], "f">, Alias<format>, HelpText<"Alias for --format">;