Skip to content

🐛 Fix Windows diagnostics and device exports - #2719

Merged
burgholzer merged 2 commits into
mainfrom
codex/windows-build-diagnostics
Oct 9, 2026
Merged

burgholzer merged 2 commits into
mainfrom
codex/windows-build-diagnostics

Conversation

@burgholzer

@burgholzer burgholzer commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Fix the independent Core diagnostics exposed by the Windows ARM64 release build. This PR is based directly on main and does not depend on #2715 or #2545.

  • Use the declared QDMI exports for hidden device libraries. This avoids CMake's automatic export scanner, which fails on MSVC IPO objects before linking; other libraries retain their existing export policy.
  • Keep Core's MSVC exception handling and SDK-compatible RTTI flags consistent, including object-library targets, and explicitly pair the benchmark's LLVM EH/RTTI requirements.
  • Replace deprecated LLVM APIs and implicit jeff operation conversions, propagate bytecode-writing failures, use std::ignore for deliberately discarded values, and check fallible test setup. Use fixed-width types for DD bit positions and SHA-256 padding bytes.
  • Complete the test enum switch and scope the Cap’n Proto/LLVM warning suppressions to the affected dependency target and includes.
  • Reject OpenQASM register slices used as Boolean conditions. The missing switch case previously accepted them silently; one case extends the existing regression table.

The QIR C4297 warnings concern exceptions crossing the C entry points and remain part of #2545. The remaining warnings identified in the Windows ARM64 follow-up log are addressed here. No LTO or deployment policy changes are included.

Validation: native Release build; 3,952 tests passed and one expected skip; repository lint; whole-file C++ lint on the changed files. The added OpenQASM case fails before the fix and passes afterward. Focused CMake probes check the actual target helpers with MSVC/native and RTTI configurations, and both device libraries expose all 19 declared QDMI entry points. The Windows ARM64 build passed before the follow-up warning fixes; the latest changes still need MSVC CI validation.

AI assistance: Codex implemented these changes and specialist agents reviewed the MSVC flag and export handling.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

Use declared QDMI exports for hidden device libraries so CMake does not
scan MSVC IPO objects. Keep Core exception handling and LLVM RTTI flags
consistent on Windows without disabling STL exception support.

Update deprecated LLVM APIs, handle discarded results, and avoid narrowing
DD bit positions. Reject non-Boolean OpenQASM slice conditions instead of
silently accepting them; extend the existing frontend regression test.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer added fix Fix for something that isn't working c++ Anything related to C++ code MLIR Anything related to MLIR labels Oct 9, 2026
@burgholzer burgholzer self-assigned this Oct 9, 2026
@burgholzer burgholzer added this to the v4.1.0 - QDMI 1.4 / MQSF milestone Oct 9, 2026
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../Dialect/QC/Translation/TranslateQCToOpenQASM3.cpp 0.0% 1 Missing ⚠️
mlir/tools/mqt-cc/mqt-cc.cpp 50.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Use std::ignore for deliberately discarded values and fixed-width DD bit
positions. Check fallible MLIR setup and bytecode writes, make jeff result
conversions explicit, and type SHA-256 padding bytes before emplacement.

Keep Core warnings enabled while limiting the Capn Proto and LLVM header
suppressions to their affected target and includes. QIR exception-boundary
warnings remain with the exception migration.

Assisted-by: GPT-6 via Codex
@burgholzer
burgholzer enabled auto-merge (squash) October 9, 2026 09:52
@burgholzer
burgholzer merged commit 0ad5f53 into main Oct 9, 2026
27 checks passed
@burgholzer
burgholzer deleted the codex/windows-build-diagnostics branch October 9, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code fix Fix for something that isn't working MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant