Skip to content

Commit

Permalink
fix pre build with static crt
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Aug 8, 2024
1 parent 08d0df5 commit b0654b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/pre_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ if (!process.env.GITHUB_ENV) {
}
console.log('bun install')
if (platform == 'windows') {
console.log(`$env:RUSTFLAGS = "-C target-feature=+crt-static"`)
console.log(`$env:FFMPEG_DIR = "${exports.ffmpeg}"`)
console.log(`$env:OPENBLAS_PATH = "${exports.openBlas}"`)
console.log(`$env:LIBCLANG_PATH = "${exports.libClang}"`)
Expand Down Expand Up @@ -269,6 +270,10 @@ if (process.env.GITHUB_ENV) {
await fs.appendFile(process.env.GITHUB_ENV, embed_metal)
}
if (platform == 'windows') {
const rustFlags = `RUSTFLAGS="-C target-feature=+crt-static"\n`
console.log('Adding ENV', rustFlags)
await fs.appendFile(process.env.GITHUB_ENV, rustFlags)

const openblas = `OPENBLAS_PATH=${exports.openBlas}\n`
console.log('Adding ENV', openblas)
await fs.appendFile(process.env.GITHUB_ENV, openblas)
Expand Down

0 comments on commit b0654b0

Please sign in to comment.