Skip to content

Commit bf796c6

Browse files
logaretmcodex
andcommitted
ci: strip unsupported Node 26 Windows LTO flags
Co-Authored-By: OpenAI Codex <codex@openai.com>
1 parent e32f53c commit bf796c6

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,19 @@ jobs:
278278
if: matrix.arch != 'arm64'
279279
run: yarn build:bindings:configure
280280

281+
- name: Remove unsupported Node LTO flags
282+
if: matrix.os == 'windows-2022' && matrix.node == 26 && matrix.arch != 'arm64'
283+
shell: pwsh
284+
run: |
285+
$projectFiles = Get-ChildItem -Path build -Filter *.vcxproj -Recurse
286+
foreach ($file in $projectFiles) {
287+
$content = Get-Content -Raw -Path $file.FullName
288+
$content = $content -replace '(?i)\s*-flto=(thin|full)', ''
289+
$content = $content -replace '(?i)\s*/flto=(thin|full)', ''
290+
$content = $content -replace '(?i)\s*/opt:lldltojobs=\d+', ''
291+
Set-Content -Path $file.FullName -Value $content -NoNewline
292+
}
293+
281294
- name: Configure node-gyp (arm64, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }})
282295
if: matrix.arch == 'arm64' && matrix.target_platform != 'darwin'
283296
run: yarn build:bindings:configure:arm64

0 commit comments

Comments
 (0)