mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
chore: fix the build scripts again (#10912)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -6,7 +6,7 @@ try {
|
||||
Set-Location (mkdir -Force build)
|
||||
|
||||
Run cmake @CMAKE_FLAGS -DBUILD_SHARED_LIBS=OFF -DENABLE_TEST=OFF -DENABLE_INSTALL=OFF -DENABLE_WERROR=0 -DENABLE_ICONV=0 -DENABLE_LibGCC=0 -DENABLE_LZMA=0 -DENABLE_LZ4=0 -DENABLE_LIBXML2=0 -DENABLE_LIBB2=0 -DENABLE_OPENSSL=0 -DENABLE_CAT=0 ..
|
||||
Run cmake --build . --clean-first --config Release
|
||||
Run cmake --build . --clean-first --config Release --verbose
|
||||
|
||||
Copy-Item libarchive\archive_static.lib $BUN_DEPS_OUT_DIR\archive.lib
|
||||
Write-Host "-> archive.lib"
|
||||
|
||||
@@ -50,18 +50,18 @@ $CFLAGS = '/O2'
|
||||
$CXXFLAGS = '/O2'
|
||||
# $CXXFLAGS = '/O2 /MT'
|
||||
|
||||
if ($Baseline) {
|
||||
$CFLAGS += ' -march=nehalem'
|
||||
$CXXFLAGS += ' -march=nehalem'
|
||||
}
|
||||
$CPU_NAME = if ($Baseline) { "nehalem" } else { "haswell" };
|
||||
|
||||
$CFLAGS += " -march=${CPU_NAME}"
|
||||
$CXXFLAGS += " -march=${CPU_NAME}"
|
||||
|
||||
$CMAKE_FLAGS = @(
|
||||
"-GNinja",
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
"-DCMAKE_C_COMPILER=$CC",
|
||||
"-DCMAKE_CXX_COMPILER=$CXX",
|
||||
"-DCMAKE_C_FLAGS=`"$CFLAGS`"",
|
||||
"-DCMAKE_CXX_FLAGS=`"$CXXFLAGS`""
|
||||
"-DCMAKE_C_FLAGS=$CFLAGS",
|
||||
"-DCMAKE_CXX_FLAGS=$CXXFLAGS"
|
||||
)
|
||||
$env:CC = "clang-cl"
|
||||
$env:CXX = "clang-cl"
|
||||
@@ -86,9 +86,10 @@ function Run() {
|
||||
$command = $args[0]
|
||||
$commandArgs = @()
|
||||
if ($args.Count -gt 1) {
|
||||
$commandArgs = $args[1..($args.Count - 1)]
|
||||
$commandArgs = @($args[1..($args.Count - 1)] | % {$_})
|
||||
}
|
||||
|
||||
write-host "> $command $commandArgs"
|
||||
& $command $commandArgs
|
||||
$result = $LASTEXITCODE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user