14 lines
779 B
PowerShell
14 lines
779 B
PowerShell
param([Parameter(Mandatory=$true)][string]$Toolchain)
|
|
$ErrorActionPreference='Stop'
|
|
& "$PSScriptRoot/build.ps1" -Toolchain $Toolchain
|
|
$oldVBCC=$env:VBCC
|
|
$oldPath=$env:PATH
|
|
try {
|
|
$env:VBCC=Join-Path $PSScriptRoot 'build/vbcc'
|
|
$env:PATH=(Join-Path $Toolchain 'bin')+';'+$env:PATH
|
|
& (Join-Path $Toolchain 'bin/vc.exe') +boing -O2 -c99 -o "$PSScriptRoot/build/CoreTests" "$PSScriptRoot/core-tests.c" "$PSScriptRoot/irc.c"
|
|
if($LASTEXITCODE -ne 0){throw 'Test build failed.'}
|
|
& (Join-Path $Toolchain 'bin/vc.exe') +boing -O2 -c99 '-IC:/Amiga/Projects/RetroIRC/third_party/amissl/include' -o "$PSScriptRoot/build/TLSProbe" "$PSScriptRoot/tls-probe.c" "$PSScriptRoot/tls.c"
|
|
if($LASTEXITCODE -ne 0){throw 'TLS probe build failed.'}
|
|
} finally {$env:VBCC=$oldVBCC;$env:PATH=$oldPath}
|