Repository navigation
Fix WebGPU build error when LTO is enabled - #32813
Merged
Scott McKay (skottmckay) merged 2 commits intoSep 26, 2026
Merged
Conversation
LINK : error C2220: the following warning is treated as an error [N:\_work\1\b\RelWithDebInfo\onnxruntime_provider_test.vcxproj] LINK : warning C4744: 'static char const absl::lts_20250814::base_internal::FastTypeTag<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::kDummyVar' has different type in 'n:\_work\1\b\relwithdebinfo\_deps\googletest-src\googletest\src\gtest-all.cc' and 'n:\_work\1\s\onnxruntime\test\providers\webgpu\webgpu_context_test.cc': 'unsigned char' and 'signed char' [N:\_work\1\b\RelWithDebInfo\onnxruntime_provider_test.vcxproj]
Contributor
Author
|
Yang Gu (@gyagp) could you please take a look? |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused workaround addresses the reported LTO conflict and adds CI coverage for the affected configuration.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes WebGPU test linking under MSVC LTO by avoiding type-specific Abseil flag access.
Changes:
- Uses Abseil’s type-erased flag reflection API with a non-Abseil fallback.
- Enables LTO in Windows WebGPU CI coverage.
| File | Description |
|---|---|
onnxruntime/​test/​providers/​webgpu/​webgpu_context_test.cc |
Safely sets and restores the death-test style flag. |
.github/​workflows/​windows_webgpu.yml |
Adds LTO coverage to the main WebGPU build. |
No actionable issues identified.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jiajia Qin (qjia7)
approved these changes
Sep 26, 2026
Scott McKay (skottmckay)
deleted the
skottmckay/fix_webgpu_build_error
branch
September 26, 2026 04:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix warning from recent change in #32729
Motivation and Context
Fix packaging pipeline