Reverse operation of bytecode embedding flag: from --no-bytecode
to --bytecode
See [issue #384](https://github.com/premake/premake-core/issues/384) for more information
This commit is contained in:
parent
305430ac11
commit
461304c89b
@ -74,8 +74,8 @@
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "no-bytecode",
|
||||
description = "Don't embed bytecode, but instead use the stripped souce code."
|
||||
trigger = "bytecode",
|
||||
description = "Embed scripts as bytecode instead of stripped souce code"
|
||||
}
|
||||
|
||||
--
|
||||
|
@ -1,8 +1,8 @@
|
||||
--
|
||||
-- Embed the Lua scripts into src/host/scripts.c as static data buffers.
|
||||
-- I embed the actual scripts, rather than Lua bytecodes, because the
|
||||
-- bytecodes are not portable to different architectures, which causes
|
||||
-- issues in Mac OS X Universal builds.
|
||||
-- Embeds minified versions of the actual scripts by default, rather than
|
||||
-- bytecode, as bytecodes are not portable to different architectures. Use
|
||||
-- the `--bytecode` flag to override.
|
||||
--
|
||||
|
||||
local scriptCount = 0
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
local function addScript(result, filename, name, data)
|
||||
if not data then
|
||||
if not _OPTIONS["no-bytecode"] then
|
||||
if _OPTIONS["bytecode"] then
|
||||
verbosef("Compiling... " .. filename)
|
||||
local output = path.replaceextension(filename, ".luac")
|
||||
local res, err = os.compile(filename, output);
|
||||
|
@ -111,7 +111,11 @@
|
||||
--
|
||||
|
||||
print("Updating embedded scripts...")
|
||||
if kind == "source" then
|
||||
z = execQuiet("premake5 embed")
|
||||
else
|
||||
z = execQuiet("premake5 --bytecode embed")
|
||||
end
|
||||
if z ~= 0 then
|
||||
error("failed to update the embedded scripts", 0)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user