Skip to content

Commit

Permalink
test 4
Browse files Browse the repository at this point in the history
  • Loading branch information
paperclover committed Nov 1, 2023
1 parent 4587298 commit 26a9386
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions windows-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ if ($Env:VSCMD_ARG_TGT_ARCH -eq "x86") {
throw "Visual Studio environment is targetting 32 bit. This configuration is definetly a mistake."
}

# Remove strawberry from the path while compiling ICU
# They define `link.exe` and many other things which will cause the build to fail.
$OriginalPath = $env:PATH
$env:PATH = ($env:PATH -split ";" | Where-Object { $_ -notlike "*strawberry*" }) -join ';'
# Fix up $PATH
$SplitPath = $env:PATH -split ";";
$MSVCToolsPath = $SplitPath | Where-Object { $_ -like "*HostX64/x64" } | Select-Object -First 1
$SplitPath = $MSVCToolsPath + ($SplitPath | Where-Object { $_ -notlike "*HostX64/x64" })
$PathWithPerl = $SplitPath -join ";"
$env:PATH = ($SplitPath | Where-Object { $_ -notlike "*strawberry*" }) -join ';'

$env:CC = "clang-cl"
$env:CXX = "clang-cl"
$env:CFLAGS = "/Zi /Z7"
$env:CXXFLAGS = "/Zi /Z7"

$output = if ($env:WEBKIT_OUTPUT_DIR) { $env:WEBKIT_OUTPUT_DIR } else { "bun-webkit" }
$WebKitBuild = if ($env:WEBKIT_BUILD_DIR) { $env:WEBKIT_BUILD_DIR } else { "WebKitBuild" }
Expand Down Expand Up @@ -112,14 +119,9 @@ if (!(Test-Path -Path $ICU_SHARED_ROOT)) {

}

$env:CC = "clang-cl"
$env:CXX = "clang-cl"
$env:CFLAGS = "/Zi /Z7"
$env:CXXFLAGS = "/Zi /Z7"

Write-Host ":: Configuring WebKit"

$env:PATH = $OriginalPath
$env:PATH = $PathWithPerl

cmake -S . -B $WebKitBuild `
-DPORT="JSCOnly" `
Expand Down

0 comments on commit 26a9386

Please sign in to comment.