mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix various Windows build issues
This commit is contained in:
1
.vscode/launch.json
generated
vendored
1
.vscode/launch.json
generated
vendored
@@ -17,6 +17,7 @@
|
||||
"cwd": "${workspaceFolder}/test",
|
||||
"env": {
|
||||
"FORCE_COLOR": "1",
|
||||
"BUN_DEBUG_QUIET_LOGS": "1",
|
||||
"BUN_GARBAGE_COLLECTOR_LEVEL": "1",
|
||||
},
|
||||
"console": "internalConsole",
|
||||
|
||||
@@ -3,6 +3,7 @@ $ErrorActionPreference = 'Stop' # Setting strict mode, similar to 'set -euo pip
|
||||
|
||||
Push-Location (Join-Path $BUN_DEPS_DIR 'boringssl')
|
||||
try {
|
||||
Remove-Item -ErrorAction SilentlyContinue -Recurse -Force build
|
||||
Set-Location (mkdir -Force build)
|
||||
|
||||
Run cmake @CMAKE_FLAGS ..
|
||||
|
||||
@@ -3,6 +3,7 @@ $ErrorActionPreference = 'Stop' # Setting strict mode, similar to 'set -euo pip
|
||||
|
||||
Push-Location (Join-Path $BUN_DEPS_DIR 'mimalloc')
|
||||
try {
|
||||
Remove-Item -ErrorAction SilentlyContinue -Recurse -Force build
|
||||
Set-Location (mkdir -Force build)
|
||||
|
||||
Run cmake .. @CMAKE_FLAGS `
|
||||
|
||||
@@ -75,12 +75,11 @@ $CMAKE_FLAGS = @(
|
||||
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded"
|
||||
)
|
||||
|
||||
if ($env:USE_LTO -eq "1") {
|
||||
if (Get-Command lld-lib -ErrorAction SilentlyContinue) {
|
||||
$AR = Get-Command lld-lib -ErrorAction SilentlyContinue
|
||||
$env:AR = $AR
|
||||
$CMAKE_FLAGS += "-DCMAKE_AR=$AR"
|
||||
}
|
||||
if (Get-Command llvm-lib -ErrorAction SilentlyContinue) {
|
||||
$AR_CMD = Get-Command llvm-lib -ErrorAction SilentlyContinue
|
||||
$AR = $AR_CMD.Path
|
||||
$env:AR = $AR
|
||||
$CMAKE_FLAGS += "-DCMAKE_AR=$AR"
|
||||
}
|
||||
|
||||
$env:CC = "clang-cl"
|
||||
|
||||
Reference in New Issue
Block a user