VerteDinde

#51292: fix: pre-create thinlto-cache dir on Windows to avoid bindflt race

Merged
Created: Apr 23, 2026, 12:17:03 PM
Merged: Apr 24, 2026, 8:50:18 AM
1 comments
Target: main

Description of Change

Pre-creates the out/Default/thinlto-cache directory before invoking e build
on Windows, preventing lld-link from hitting a transient ERROR_INVALID_PARAMETER
when creating the directory through bindflt on the 32-core ARC runners (#51256).

The 32-core Windows ARC runners use container bind mounts backed by a filesystem
filter driver (bindflt/wcifs). Under the concurrent I/O burst of a Chromium build,
CreateDirectoryW can transiently fail with ERROR_INVALID_PARAMETER — the same
class of bug that #51256 patched for siso's ninja manifest opens. lld-link has no
retry logic, so it aborts with:

LLVM ERROR: can't create cache directory thinlto-cache: invalid argument

Pre-creating the directory means lld-link's CreateDirectoryW becomes a no-op
(ERROR_ALREADY_EXISTS), sidestepping the driver race entirely.

Checklist

Release Notes

Notes: none

Backports

No Backports Requested

This pull request doesn't have any backports requested or created for older release branches.

What are backports?

Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron