build: three device-free executables do not build with the documented clang-cl route #3867
Open
opened 2026-12-02 15:43:48 +00:00 by triggered02
·
2 comments
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
R0Y00/Xbox2Windows#3867
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T15:43:48Z.
Summary.
docs/non-windows-hosts.mdsays the clang-cl + xwin route builds "the eight startup stand-ins (xmem_shim,d3d12_xs_shimand the sixstartup_stub_*targets) and the device-free test executables ... from a clean checkout". I built the whole tree that way on currentmainand three device-free executables do not build. One is a plain clang/MSVC divergence with a one-line fix (PR below); the other two I am reporting without a fix.Environment: Debian, clang-cl 19.1.1 + lld-link,
xwin splatof SDK 10.0.26100, Release, the toolchain file from that doc section. Tree:mainat0939575e, clean checkout.xapuis the known gap (no MSVCm.libon this host, already documented). The other three are below.1.
startup_gameinput_trace— const-cast idiom, fixed in #3866.vtblisconst void* const*, and four calls doreinterpret_cast<Fn>(vtbl[n]), which dropsconst:MSVC accepts this, clang does not. Casting through
const_cast<void*>first is accepted by both and changes nothing at runtime. With that one change the target links.2.
xmem_commit_protection_check— the compiler crashes.139 is SIGSEGV in the frontend, not a diagnostic. It may be a clang 19.1.1 bug rather than anything this repo does, but it means the target cannot be built on this route at all. I have not reduced it;
-vand a reduced preprocessed source would be the next step, and I do not know whether it reproduces on other clang versions.3.
startup_host_cpu_probe— intrinsics unresolved at link.The source uses intrinsics that MSVC's headers declare
__forceinlinefrom<intrin.h>; with this layout they arrive as external calls instead. Likely a missing#include <intrin.h>or an architecture flag (/arch:SSE2/-msse2) on this route. I have not confirmed which.What I am not claiming. None of this affects the Windows build or CI — MSVC remains the reference and Windows CI is green. It only narrows what "builds on Linux with clang-cl" actually covers, and two of the three gaps look like documentation overstatement rather than code defects worth changing for their own sake.
I am fixing (1) in a PR because it is small, verifiable here, and inside the route the doc already promises. Say if you would rather the doc name the narrower set of targets that currently build and I will do that instead.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T15:46:48Z.
Progress on two of the three, plus a root cause for the third.
2.
xmem_commit_protection_check— reduced, fixed in #3869, and it is an upstream clang bug. The crash is inGenerateSEHFilterFunction→EmitCapturedLocals→recoverAddrOfEscapedLocal. Trigger, reduced to ~20 lines:__exceptfiltercapture_fault(GetExceptionInformation(), &info)capture_fault(plain_ep(), &info)capture_fault(GetExceptionInformation())— no captured localSo clang 19.1.1 cannot recover an escaped local inside an outlined SEH filter when that filter also references the exception record. The workaround in #3869 records through a
thread_localsink so the filter captures nothing; semantics and MSVC output are unchanged.3.
startup_host_cpu_probe— root cause identified, not fixed. It is not a missing<intrin.h>(the file already includes<immintrin.h>and<intrin.h>). The build picks up xwin's MSVC CRT headers, not clang's:MSVC's headers declare these intrinsics and rely on
#pragma intrinsic; under clang-cl those declarations are not turned into clang builtins, so_mm_loadu_si128,__rdtscp,_mm_set_epi32,_mm_add_epi32are emitted as calls and stay undefined at link:__SSE2__is defined and the target is x86-64, so this is not an architecture-flag problem — it is header precedence: the/imsvcxwin paths are searched before clang's-internal-isystemresource headers. The fix therefore belongs in the toolchain file or the CMake warning/feature block, not in the test source, and I would rather you decide which side owns it than have me move header precedence around in a file other contributors copy into their own toolchains. Options I see: give clang's resource include priority over the xwin CRT for<*.h>intrinsics, or add#if defined(__clang__)builtin mappings in the one test that needs them.1.
startup_gameinput_trace— fixed in #3868.Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T16:05:26Z.
Correction on item 3 — that one is my host, not the repository. Please disregard the header-precedence theory; I found the actual cause and it is a broken toolchain install on my side.
My unpacked Ubuntu
llvm-19archive has no clang resource headers at all —lib/clang/19/includedoes not exist. So clang-cl has no intrinsic headers of its own, picks up the MSVC<immintrin.h>from the xwin CRT, and MSVC's declarations stay unresolved because clang does not honour#pragma intrinsicfor them._mm_loadu_si128etc. therefore become calls, exactly asllvm-nmshowed.On a toolchain that ships
libclang-common-19-dev(or any complete clang install) the resource headers are present, clang's own<immintrin.h>defines those intrinsics as builtins, and this link failure should not occur. So item 3 is not evidence against the documented route and needs no repository change. I have not verified that on a complete install — I am telling you what the missing directory implies, not claiming a clean build I did not run.For completeness, I also tested the fix that would have followed from my wrong theory: putting clang's resource include first in the
/imsvclist changes nothing here, because the directory is empty. That experiment is void.Status of the three gaps, corrected:
startup_gameinput_trace— repository bug, fixed in #3868 (approved).xmem_commit_protection_check— upstream clang bug, reduced, worked around in #3869 (merged intomainas6e3a181b).startup_host_cpu_probe— my host's incomplete LLVM install, not a repository issue. Withdraw.I would still like to know whether the doc's sentence holds on a complete clang install, but that is your call to spend time on — from here the only honest next step I could take is installing the missing headers and re-running, which does not test the repository at all.