Skip to content

Commit 592b7b7

Browse files
authored
Fix args ordering in LLVM build from previous commit (#1179)
1 parent fa5f5f3 commit 592b7b7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

emsdk.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,23 +1070,23 @@ def build_llvm(tool):
10701070
targets_to_build = 'WebAssembly;AArch64'
10711071
else:
10721072
targets_to_build = 'WebAssembly'
1073-
args = ['-DLLVM_TARGETS_TO_BUILD=' + targets_to_build,
1074-
'-DLLVM_INCLUDE_EXAMPLES=OFF',
1075-
'-DLLVM_INCLUDE_TESTS=' + tests_arg,
1076-
'-DCLANG_INCLUDE_TESTS=' + tests_arg,
1077-
'-DLLVM_ENABLE_ASSERTIONS=' + ('ON' if enable_assertions else 'OFF'),
1078-
# Disable optional LLVM dependencies, these can cause unwanted .so dependencies
1079-
# that prevent distributing the generated compiler for end users.
1080-
'-DLLVM_ENABLE_LIBXML2=OFF', '-DLLVM_ENABLE_TERMINFO=OFF', '-DLLDB_ENABLE_LIBEDIT=OFF',
1081-
'-DLLVM_ENABLE_LIBEDIT=OFF', '-DLLVM_ENABLE_LIBPFM=OFF']
1073+
cmake_generator, args = get_generator_and_config_args(tool)
1074+
args += ['-DLLVM_TARGETS_TO_BUILD=' + targets_to_build,
1075+
'-DLLVM_INCLUDE_EXAMPLES=OFF',
1076+
'-DLLVM_INCLUDE_TESTS=' + tests_arg,
1077+
'-DCLANG_INCLUDE_TESTS=' + tests_arg,
1078+
'-DLLVM_ENABLE_ASSERTIONS=' + ('ON' if enable_assertions else 'OFF'),
1079+
# Disable optional LLVM dependencies, these can cause unwanted .so dependencies
1080+
# that prevent distributing the generated compiler for end users.
1081+
'-DLLVM_ENABLE_LIBXML2=OFF', '-DLLVM_ENABLE_TERMINFO=OFF', '-DLLDB_ENABLE_LIBEDIT=OFF',
1082+
'-DLLVM_ENABLE_LIBEDIT=OFF', '-DLLVM_ENABLE_LIBPFM=OFF']
10821083
# LLVM build system bug: compiler-rt does not build on Windows. It insists on performing a CMake install step that writes to C:\Program Files. Attempting
10831084
# to reroute that to build_root directory then fails on an error
10841085
# file INSTALL cannot find
10851086
# "C:/code/emsdk/llvm/git/build_master_vs2017_64/$(Configuration)/lib/clang/10.0.0/lib/windows/clang_rt.ubsan_standalone-x86_64.lib".
10861087
# (there instead of $(Configuration), one would need ${CMAKE_BUILD_TYPE} ?)
10871088
# It looks like compiler-rt is not compatible to build on Windows?
10881089
args += ['-DLLVM_ENABLE_PROJECTS=clang;lld']
1089-
cmake_generator, args = get_generator_and_config_args(tool)
10901090

10911091
if os.getenv('LLVM_CMAKE_ARGS'):
10921092
extra_args = os.environ['LLVM_CMAKE_ARGS'].split(',')

0 commit comments

Comments
 (0)