File tree Expand file tree Collapse file tree 4 files changed +17
-6
lines changed
Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,7 @@ if (LLDB_ENABLE_PYTHON)
8787endif ()
8888
8989if (LLDB_ENABLE_LUA)
90- find_program (Lua_EXECUTABLE lua5.3)
91- set (LLDB_LUA_DEFAULT_RELATIVE_PATH "lib/lua/5.3" )
90+ set (LLDB_LUA_DEFAULT_RELATIVE_PATH "lib/lua/${LUA_VERSION_MAJOR} .${LUA_VERSION_MINOR} " )
9291 set (LLDB_LUA_RELATIVE_PATH ${LLDB_LUA_DEFAULT_RELATIVE_PATH}
9392 CACHE STRING "Path where Lua modules are installed, relative to install prefix" )
9493endif ()
Original file line number Diff line number Diff line change @@ -8,11 +8,21 @@ if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND LLDB_ENABLE_SWIG)
88 set (LUAANDSWIG_FOUND TRUE )
99else ()
1010 if (LLDB_ENABLE_SWIG)
11- find_package (Lua 5.3 EXACT )
11+ find_package (Lua 5.3)
1212 if (LUA_FOUND)
13+ # Find the Lua executable. Only required to run a subset of the Lua
14+ # tests.
15+ find_program (LUA_EXECUTABLE
16+ NAMES
17+ "lua"
18+ "lua${LUA_VERSION_MAJOR} .${LUA_VERSION_MINOR} "
19+ )
1320 mark_as_advanced (
1421 LUA_LIBRARIES
15- LUA_INCLUDE_DIR)
22+ LUA_INCLUDE_DIR
23+ LUA_VERSION_MINOR
24+ LUA_VERSION_MAJOR
25+ LUA_EXECUTABLE)
1626 endif ()
1727 else ()
1828 message (STATUS "SWIG 4 or later is required for Lua support in LLDB but could not be found" )
2636 REQUIRED_VARS
2737 LUA_LIBRARIES
2838 LUA_INCLUDE_DIR
39+ LUA_VERSION_MINOR
40+ LUA_VERSION_MAJOR
2941 LLDB_ENABLE_SWIG)
3042endif ()
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ CMake configuration error.
6464+-------------------+------------------------------------------------------+--------------------------+
6565| Python | Python scripting | ``LLDB_ENABLE_PYTHON `` |
6666+-------------------+------------------------------------------------------+--------------------------+
67- | Lua | Lua scripting | ``LLDB_ENABLE_LUA `` |
67+ | Lua | Lua scripting. Lua 5.3 and 5.4 are supported. | ``LLDB_ENABLE_LUA `` |
6868+-------------------+------------------------------------------------------+--------------------------+
6969
7070Depending on your platform and package manager, one might run any of the
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
2020config.target_triple = "@LLVM_TARGET_TRIPLE@"
2121config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
2222config.python_executable = "@Python3_EXECUTABLE@"
23- config.lua_executable = "@Lua_EXECUTABLE @"
23+ config.lua_executable = "@LUA_EXECUTABLE @"
2424config.lua_test_entry = "TestLuaAPI.py"
2525config.dotest_common_args_str = lit_config.substitute("@LLDB_TEST_COMMON_ARGS@")
2626config.dotest_user_args_str = lit_config.substitute("@LLDB_TEST_USER_ARGS@")
You can’t perform that action at this time.
0 commit comments