Fix 5.4 build when using VS

This commit is contained in:
Peter Melnichenko 2018-07-11 21:16:41 +03:00
parent 732397ef98
commit a30d0dd550
2 changed files with 5 additions and 1 deletions

View File

@ -1437,7 +1437,7 @@ class RioLua(Lua):
# from a git repo that does not have them, like the default one. # from a git repo that does not have them, like the default one.
if len(built_luac_objs) > 0: if len(built_luac_objs) > 0:
if using_cl(): if using_cl():
run("link", "/nologo", "/out:luac.exe", built_luac_objs, lib_objs) run("link", "/nologo", "/out:luac.exe", built_luac_objs, [lib_obj for lib_obj in lib_objs if lib_obj != "lopcodes.obj"])
if os.path.exists("luac.exe.manifest"): if os.path.exists("luac.exe.manifest"):
run("mt", "/nologo", "-manifest", "luac.exe.manifest", "-outputresource:luac.exe") run("mt", "/nologo", "-manifest", "luac.exe.manifest", "-outputresource:luac.exe")

View File

@ -150,3 +150,7 @@ class TestCLI(unittest.TestCase):
def test_install_lua_5_4_with_luarocks_3(self): def test_install_lua_5_4_with_luarocks_3(self):
self.assertHererocksSuccess(["--lua", "5.4", "--luarocks", "3"]) self.assertHererocksSuccess(["--lua", "5.4", "--luarocks", "3"])
self.assertHererocksSuccess(["--lua", "5.4.0-work1", "--luarocks", "3"]) self.assertHererocksSuccess(["--lua", "5.4.0-work1", "--luarocks", "3"])
if os.name == "nt":
self.assertHererocksSuccess(["--lua", "5.4", "--luarocks", "3", "--target", "vs"])
self.assertHererocksSuccess(["--lua", "5.4.0-work1", "--luarocks", "3", "--target", "vs"])