Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix args ordering in LLVM build from previous commit #1179

Merged
merged 1 commit into from
Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions emsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,23 +1070,23 @@ def build_llvm(tool):
targets_to_build = 'WebAssembly;AArch64'
else:
targets_to_build = 'WebAssembly'
args = ['-DLLVM_TARGETS_TO_BUILD=' + targets_to_build,
'-DLLVM_INCLUDE_EXAMPLES=OFF',
'-DLLVM_INCLUDE_TESTS=' + tests_arg,
'-DCLANG_INCLUDE_TESTS=' + tests_arg,
'-DLLVM_ENABLE_ASSERTIONS=' + ('ON' if enable_assertions else 'OFF'),
# Disable optional LLVM dependencies, these can cause unwanted .so dependencies
# that prevent distributing the generated compiler for end users.
'-DLLVM_ENABLE_LIBXML2=OFF', '-DLLVM_ENABLE_TERMINFO=OFF', '-DLLDB_ENABLE_LIBEDIT=OFF',
'-DLLVM_ENABLE_LIBEDIT=OFF', '-DLLVM_ENABLE_LIBPFM=OFF']
cmake_generator, args = get_generator_and_config_args(tool)
args += ['-DLLVM_TARGETS_TO_BUILD=' + targets_to_build,
'-DLLVM_INCLUDE_EXAMPLES=OFF',
'-DLLVM_INCLUDE_TESTS=' + tests_arg,
'-DCLANG_INCLUDE_TESTS=' + tests_arg,
'-DLLVM_ENABLE_ASSERTIONS=' + ('ON' if enable_assertions else 'OFF'),
# Disable optional LLVM dependencies, these can cause unwanted .so dependencies
# that prevent distributing the generated compiler for end users.
'-DLLVM_ENABLE_LIBXML2=OFF', '-DLLVM_ENABLE_TERMINFO=OFF', '-DLLDB_ENABLE_LIBEDIT=OFF',
'-DLLVM_ENABLE_LIBEDIT=OFF', '-DLLVM_ENABLE_LIBPFM=OFF']
# 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
# to reroute that to build_root directory then fails on an error
# file INSTALL cannot find
# "C:/code/emsdk/llvm/git/build_master_vs2017_64/$(Configuration)/lib/clang/10.0.0/lib/windows/clang_rt.ubsan_standalone-x86_64.lib".
# (there instead of $(Configuration), one would need ${CMAKE_BUILD_TYPE} ?)
# It looks like compiler-rt is not compatible to build on Windows?
args += ['-DLLVM_ENABLE_PROJECTS=clang;lld']
cmake_generator, args = get_generator_and_config_args(tool)

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