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

LuaJIT: Fix WITH_AMALG option failing during parallel builds #454

Merged
merged 1 commit into from
Jan 29, 2020
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
9 changes: 9 additions & 0 deletions deps/luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,15 @@ IF(WIN32)
ELSE()
IF(WITH_AMALG)
add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${LUAJIT_DIR}/src/ljamalg.c ${DEPS})
# When using WITH_AMALG during a parallel build, its possible to run into
# false-positive "error: 'fold_hash' undeclared" compile errors due to a weird interaction
# when building two ljamalg.c at the same time.
#
# This adds a fake dependency from one to the other, forcing the build process to
# compile them sequentially rather than parallel.
#
# See https://github.com/torch/luajit-rocks/issues/39
add_dependencies(luajit luajit-5.1)
ELSE()
add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${SRC_LJCORE} ${DEPS})
ENDIF()
Expand Down