cb424d7448
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).
45 lines
2.9 KiB
C
45 lines
2.9 KiB
C
// RUN: %clang -### -Werror --target=x86_64 -fdebug-default-version=4 -gdwarf-2 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF2 --implicit-check-not=warning:
|
|
// RUN: %clang -### -Werror --target=x86_64 -gdwarf-3 -fdebug-default-version=4 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF3
|
|
// RUN: %clang -### -Werror --target=x86_64 -gdwarf-4 -fdebug-default-version=2 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF4
|
|
// RUN: %clang -### -Werror --target=x86_64 -gdwarf-5 -S -fdebug-default-version=2 -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
|
|
// RUN: %clang -### -Werror --target=x86_64 -fdebug-default-version=5 -g -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5 --implicit-check-not=warning:
|
|
// RUN: %clang -### -Werror --target=x86_64 -gdwarf -fdebug-default-version=2 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF2
|
|
// RUN: %clang -### -Werror --target=x86_64 -fdebug-default-version=4 -S -o - %s 2>&1 | FileCheck %s --check-prefixes=NODEBUGINFO,NODWARF4
|
|
|
|
// Check which debug info formats we use on Windows. By default, in an MSVC
|
|
// environment, we should use codeview. You can enable dwarf, which implicitly
|
|
// disables codeview, or you can explicitly ask for both if you don't know how
|
|
// the app will be debugged.
|
|
// RUN: %clang -### -Werror -target i686-pc-windows-msvc -fdebug-default-version=2 -gdwarf -S -o - %s 2>&1 \
|
|
// RUN: | FileCheck %s --check-prefixes=DWARF2,NOCODEVIEW
|
|
// Explicitly request both.
|
|
// RUN: %clang -### -Werror -target i686-pc-windows-msvc -fdebug-default-version=4 -gdwarf -gcodeview -S -o - %s 2>&1 \
|
|
// RUN: | FileCheck %s --check-prefixes=DWARF4,CODEVIEW
|
|
|
|
// Do Assembler testing most of the same test cases as those above.
|
|
|
|
// RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=5 -g -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
|
|
|
|
// RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=4 -gdwarf-2 -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF2
|
|
// RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-3 -fdebug-default-version=4 -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF3
|
|
// RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-4 -fdebug-default-version=2 -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF4
|
|
// RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-5 -x assembler -c -fdebug-default-version=2 -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
|
|
// RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=5 -g -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
|
|
|
|
int main(void) {
|
|
return 0;
|
|
}
|
|
|
|
// NOCODEVIEW-NOT: -gcodeview
|
|
// CODEVIEW: "-gcodeview"
|
|
|
|
// NODEBUGINFO-NOT: -debug-info-kind=
|
|
|
|
// DWARF2: "-dwarf-version=2"
|
|
// DWARF3: "-dwarf-version=3"
|
|
// DWARF4: "-dwarf-version=4"
|
|
// DWARF5: "-dwarf-version=5"
|
|
|
|
// NOCODEVIEW-NOT: -gcodeview
|
|
// NODWARF4-NOT: -dwarf-version=4
|