Skip to content

Commit ab45a8a

Browse files
committed
set crt-static in msvc builds
1 parent 3731add commit ab45a8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/upload-binaries.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ jobs:
4646
run: |
4747
rustup target add i686-pc-windows-msvc
4848
cargo build -p tmc-langs-cli --release --verbose --target ${{ matrix.target }}
49-
- name: Deploy
49+
- name: Deploy # crt-static is set with RUSTFLAGS to statically link MSVCRT (VCRUNTIME140.dll)
5050
run: |
5151
$env:python_version=$(python -c 'import sys; print(\".\".join(map(str, sys.version_info[:3])))')
5252
$env:CLOUDSDK_PYTHON="C:\hostedtoolcache\windows\Python\$env:python_version\x64\python"
53+
$env:RUSTFLAGS="-C target-feature=+crt-static"
5354
gsutil cp target/${{ matrix.target }}/release/tmc-langs-cli.exe gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$Env:TAG.exe
5455
5556
macos:

0 commit comments

Comments
 (0)