Skip to content

Commit 8ef0cec

Browse files
Use clang compiler to build llvm
1 parent ffb7116 commit 8ef0cec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/build/build-llvm-tools

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ class BuildLLVMTools:
6363
cmake_options = []
6464
if 'wasm-ld' in self.tools:
6565
cmake_options.append('-DLLVM_ENABLE_PROJECTS=lld')
66+
clang_bin_dir = self.toolchain_path / 'usr' / 'bin'
6667
subprocess.check_call([
6768
'cmake',
6869
'-G', 'Ninja',
6970
'-DCMAKE_BUILD_TYPE=Release',
71+
'-DCMAKE_C_COMPILER=' + str(clang_bin_dir / 'clang'),
72+
'-DCMAKE_CXX_COMPILER=' + str(clang_bin_dir / 'clang++'),
7073
'-DLLVM_TARGETS_TO_BUILD=WebAssembly',
7174
'-DCMAKE_INSTALL_PREFIX=' + str(self.toolchain_path),
7275
'-DLLVM_TOOLCHAIN_TOOLS=' + ';'.join(self.tools),

0 commit comments

Comments
 (0)