Skip to content

Commit e3a9c95

Browse files
authored
llvm-builder: use the ninja generator for building the builtins on windows (#299)
The builtins build should use the Ninja generator (MSVC does not build a valid archive). Tested and verified here: https://github.com/paritytech/revive-alex-workflowtest/releases/tag/untagged-f02d0f574bab8404fead Closes #305 Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
1 parent a560b2d commit e3a9c95

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/release-llvm.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ jobs:
8787
run: |
8888
brew install ninja
8989
90+
- name: Install Dependencies
91+
if: ${{ matrix.host == 'windows' }}
92+
run: |
93+
choco install ninja
94+
9095
- name: Install LLVM Builder
9196
run: |
9297
cargo install --path crates/llvm-builder

crates/llvm-builder/src/builtins.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,7 @@ pub fn build(
117117
log::info!("building compiler-rt for rv64emac");
118118

119119
crate::utils::check_presence("cmake")?;
120-
121-
let generator = if cfg!(target_os = "windows") {
122-
"Visual Studio 17 2022"
123-
} else {
124-
crate::utils::check_presence("ninja")?;
125-
"Ninja"
126-
};
120+
crate::utils::check_presence("ninja")?;
127121

128122
let llvm_module_compiler_rt = crate::LLVMPath::llvm_module_compiler_rt()?;
129123
let llvm_compiler_rt_build = crate::LLVMPath::llvm_build_compiler_rt()?;
@@ -136,7 +130,7 @@ pub fn build(
136130
"-B",
137131
llvm_compiler_rt_build.to_string_lossy().as_ref(),
138132
"-G",
139-
generator,
133+
"Ninja",
140134
])
141135
.args(CMAKE_STATIC_ARGS)
142136
.args(cmake_dynamic_args(build_type, target_env)?)

0 commit comments

Comments
 (0)