File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments