From 03c79960669916c30446fddf23934aeb244ad976 Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Sat, 28 Nov 2026 17:34:42 -0500 Subject: [PATCH] Fix Halidoscope Windows bindgen build and skip C++ CI on Halidoscope-only PRs 1. Drop .clang_args(["-x", "c++", "-std=c++17"]) in tools/halidoscope/src-tauri/build.rs so bindgen parses HalideRuntime.h in its default C mode. Recent Windows GitHub Actions runners (windows-2025-vs2026) updated MSVC to 14.52, whose yvals_core.h fails with STL1000 when parsed by an older libclang in C++ mode. bindgen only derives the C struct layout of halide_trace_packet_t, so C mode avoids pulling in MSVC's C++ STL headers. 2. Add tools/halidoscope/** to paths-ignore in the five C++ test workflows (testing-{arm-linux,linux,macos,make,windows}.yml) so Halidoscope-only PRs (including Dependabot lockfile updates) don't run the full Halide C++ test suite or fail macOS Codecov uploads due to missing Dependabot secrets. Co-authored-by: Antigravity --- .github/workflows/testing-arm-linux.yml | 1 + .github/workflows/testing-linux.yml | 1 + .github/workflows/testing-macos.yml | 1 + .github/workflows/testing-make.yml | 1 + .github/workflows/testing-windows.yml | 1 + tools/halidoscope/src-tauri/build.rs | 4 +++- 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing-arm-linux.yml b/.github/workflows/testing-arm-linux.yml index 367f23b76581..5a3169f54b86 100644 --- a/.github/workflows/testing-arm-linux.yml +++ b/.github/workflows/testing-arm-linux.yml @@ -15,6 +15,7 @@ on: - ".github/**" - "!.github/workflows/testing-arm-linux.yml" - "packaging/**" + - "tools/halidoscope/**" - "**/Makefile" - "apps/support/Makefile.inc" - 'run-clang-tidy.sh' diff --git a/.github/workflows/testing-linux.yml b/.github/workflows/testing-linux.yml index 6b86b8dbf4ac..a7cb5dd11aea 100644 --- a/.github/workflows/testing-linux.yml +++ b/.github/workflows/testing-linux.yml @@ -15,6 +15,7 @@ on: - ".github/**" - "!.github/workflows/testing-linux.yml" - "packaging/**" + - "tools/halidoscope/**" - "**/Makefile" - "apps/support/Makefile.inc" - 'run-clang-tidy.sh' diff --git a/.github/workflows/testing-macos.yml b/.github/workflows/testing-macos.yml index eb434eddc57a..aba0704fe0e8 100644 --- a/.github/workflows/testing-macos.yml +++ b/.github/workflows/testing-macos.yml @@ -21,6 +21,7 @@ on: - ".github/**" - "!.github/workflows/testing-macos.yml" - "packaging/**" + - "tools/halidoscope/**" - "**/Makefile" - "apps/support/Makefile.inc" - 'run-clang-tidy.sh' diff --git a/.github/workflows/testing-make.yml b/.github/workflows/testing-make.yml index cd00c685d110..2cabbce7f19f 100644 --- a/.github/workflows/testing-make.yml +++ b/.github/workflows/testing-make.yml @@ -19,6 +19,7 @@ on: - "doc/**" - "packaging/**" - "python_bindings/**" + - "tools/halidoscope/**" - "pyproject.toml" - "uv.lock" diff --git a/.github/workflows/testing-windows.yml b/.github/workflows/testing-windows.yml index 2d4ea4930e4a..29d6e4e35622 100644 --- a/.github/workflows/testing-windows.yml +++ b/.github/workflows/testing-windows.yml @@ -15,6 +15,7 @@ on: - ".github/**" - "!.github/workflows/testing-windows.yml" - "packaging/**" + - "tools/halidoscope/**" - "**/Makefile" - "apps/support/Makefile.inc" - 'run-clang-tidy.sh' diff --git a/tools/halidoscope/src-tauri/build.rs b/tools/halidoscope/src-tauri/build.rs index f9c49872f0dd..b9f77968b987 100644 --- a/tools/halidoscope/src-tauri/build.rs +++ b/tools/halidoscope/src-tauri/build.rs @@ -45,9 +45,11 @@ fn generate_trace_packet_bindings() -> Result<(), Box> { // Flag to cargo that we only need to rerun bindgen if HalideRuntime.h's contents have changed. println!("cargo:rerun-if-changed={}", header.display()); + // Leave bindgen in its default C mode rather than passing `-x c++`: we only need + // `halide_trace_packet_t`'s C data layout, and C++ mode pulls in MSVC's STL headers + // (`yvals_core.h`) on Windows, which reject older libclang versions with STL1000. let bindings = bindgen::Builder::default() .header(header.to_string_lossy()) - .clang_args(["-x", "c++", "-std=c++17"]) .allowlist_type("halide_trace_packet_t") .with_codegen_config(bindgen::CodegenConfig::TYPES | bindgen::CodegenConfig::VARS) .derive_default(true)