Skip to content

Commit

Permalink
Use clang to build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Aug 9, 2024
1 parent 62bf82f commit b265f79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
msystem: UCRT64
update: true
install: make diffutils tar patch unzip gzip
pacboy: 7zip:p python:p cmake:p gcc:p ninja:p zstd:p
pacboy: 7zip:p python:p cmake:p gcc:p ninja:p zstd:p clang:p lld:p

- name: Build toolchain
run: |
Expand Down
3 changes: 2 additions & 1 deletion build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ clean_storage() {

build() {
set_llvm_cfg LLVM_USE_SYMLINKS TRUE
set_build_cfg llvm.static-libstdcpp true
set_llvm_cfg LLVM_ENABLE_LLD TRUE
set_build_cfg rust.use-lld self-contained
set_build_cfg dist.include-mingw-linker true

cd rust
Expand Down
3 changes: 3 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ llvm-has-rust-patches = false

[target.x86_64-pc-windows-gnu]
llvm-has-rust-patches = false
cc = "clang"
cxx = "clang++"
linker = "clang"

0 comments on commit b265f79

Please sign in to comment.