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).
29 lines
947 B
Plaintext
29 lines
947 B
Plaintext
// RUN: %clang_cc1 -triple x86_64-unknown-gnu-linux -aux-triple amdgcn-amd-amdhsa \
|
|
// RUN: -emit-llvm -o - -x hip %s | FileCheck -check-prefixes=CHECK,LNX %s
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -aux-triple amdgcn-amd-amdhsa \
|
|
// RUN: -emit-llvm -o - -x hip %s | FileCheck -check-prefixes=CHECK,MSVC %s
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
namespace X {
|
|
__global__ void kern1(int *x);
|
|
__device__ int var1;
|
|
}
|
|
|
|
// CHECK: @[[STR1:.*]] = {{.*}} c"_ZN1X5kern1EPi\00"
|
|
// CHECK: @[[STR2:.*]] = {{.*}} c"_ZN1X4var1E\00"
|
|
|
|
// LNX-LABEL: define {{.*}}@_Z4fun1v()
|
|
// MSVC-LABEL: define {{.*}} @"?fun1@@YAPEBDXZ"()
|
|
// CHECK: ret ptr @[[STR1]]
|
|
const char *fun1() {
|
|
return __builtin_get_device_side_mangled_name(X::kern1);
|
|
}
|
|
|
|
// LNX-LABEL: define {{.*}}@_Z4fun2v()
|
|
// MSVC-LABEL: define {{.*}}@"?fun2@@YAPEBDXZ"()
|
|
// CHECK: ret ptr @[[STR2]]
|
|
__host__ __device__ const char *fun2() {
|
|
return __builtin_get_device_side_mangled_name(X::var1);
|
|
}
|