wip(assembler): M1 round 4 PARTIAL -- stopped at owner's request (GPU coil whine at night)
Unverified mid-round state (cliff plates / horizon slab / routes in progress). Resume from here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
1 parent
2c20f9eaea
commit
20c6d86f0e
11 files changed
+839
-47
No files matched your search
@@ -1,13 +1,15 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$OutputName = 'VoxelForgeCoreStandalone.exe',
|
||||
[ValidateSet('All','Core')][string]$Target = 'All'
|
||||
[ValidateSet('All','Core')][string]$Target = 'All',
|
||||
[ValidateRange(1,16)][int]$CompileWorkers = 16,
|
||||
[ValidateSet('Normal','BelowNormal')][string]$BuildPriority = 'Normal'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$BuildHostProcess = Get-Process -Id $PID
|
||||
$BuildHostProcess.PriorityClass = 'BelowNormal'
|
||||
$BuildHostProcess.ProcessorAffinity = [IntPtr]0xFF00
|
||||
$BuildHostProcess.PriorityClass = $BuildPriority
|
||||
$BuildHostProcess.ProcessorAffinity = [IntPtr]0xFFFF
|
||||
$Root = [IO.Path]::GetFullPath($PSScriptRoot)
|
||||
$BuildDir = Join-Path $Root 'Build\VoxelForgeCore'
|
||||
$BinDir = Join-Path $Root 'bin'
|
||||
@@ -72,7 +74,7 @@ $IncludeArgs = @(
|
||||
('/I"{0}"' -f (Join-Path $Root 'Source\VoxelForge\Public')),
|
||||
('/I"{0}"' -f (Join-Path $Root 'Source\VoxelForge\Private'))
|
||||
)
|
||||
$CommonFlags = @('/nologo','/std:c++20','/O2','/arch:AVX2','/fp:precise','/EHsc','/MP8','/D_CRT_SECURE_NO_WARNINGS') + $IncludeArgs
|
||||
$CommonFlags = @('/nologo','/std:c++20','/O2','/arch:AVX2','/fp:precise','/EHsc',("/MP{0}" -f $CompileWorkers),'/D_CRT_SECURE_NO_WARNINGS') + $IncludeArgs
|
||||
$CoreRsp = Join-Path $BuildDir 'core-compile.rsp'
|
||||
$CoreRspLines = $CommonFlags + @('/c') + @($CompileSources | ForEach-Object { '"{0}"' -f $_ })
|
||||
[IO.File]::WriteAllLines($CoreRsp,$CoreRspLines,[Text.UTF8Encoding]::new($false))
|
||||
@@ -89,6 +91,7 @@ if ($Target -eq 'All') {
|
||||
if ($CoreSourceNames[$Index].Replace('\','/') -eq 'Core/src/VoxelForgeCore.cpp') { continue }
|
||||
$LegacySources += $CoreSources[$Index]
|
||||
}
|
||||
$LegacySources += (Join-Path $Root 'Source\GpuFarViewerLinkStubs.cpp')
|
||||
$LegacyObjects = @($LegacySources | ForEach-Object { '"{0}.obj"' -f [IO.Path]::GetFileNameWithoutExtension($_) })
|
||||
$LegacyRspLines = $CommonFlags + @('/c') + @($LegacySources | ForEach-Object { '"{0}"' -f $_ })
|
||||
[IO.File]::WriteAllLines($LegacyRsp,$LegacyRspLines,[Text.UTF8Encoding]::new($false))
|
||||
@@ -104,8 +107,8 @@ $ViewerRspLines = $CommonFlags + @('/Fe"{0}"' -f $OutputPath) + $LegacyObjects +
|
||||
|
||||
Push-Location $BuildDir
|
||||
try {
|
||||
# One cl process with /MP8 bounds compiler work to eight processes; MSVC, lib.exe, and the
|
||||
# viewer link inherit BelowNormal priority and the 0xFF00 process affinity from this host.
|
||||
# MSVC's /MP count and the build host's Normal-priority 16-CPU mask are configurable for
|
||||
# isolated BuildHost work; the viewer process uses its own run-time worker setting.
|
||||
$CommandLine = 'call "{0}" >nul && cl.exe @"{1}" && lib.exe @"{2}"' -f $VcVars,$CoreRsp,$LibRsp
|
||||
& $env:ComSpec /d /s /c $CommandLine
|
||||
if ($LASTEXITCODE -eq -1073741502) { throw 'A build process exited with 0xC0000142; stopping as required.' }
|
||||
|
||||
Reference in new issue
Block a user