aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2023-10-21 13:31:45 +0200
committerMike Pall <mike>2023-10-21 13:31:45 +0200
commite826d0c101d750fac8334d71e221c50d8dbe236c (patch)
treeb03865dccdc948f1b04f57d8452e139b733925f1
parent4eb47df605883e983dadb78f303b22dd0232dd03 (diff)
downloadluajit-e826d0c101d750fac8334d71e221c50d8dbe236c.tar.gz
luajit-e826d0c101d750fac8334d71e221c50d8dbe236c.tar.bz2
luajit-e826d0c101d750fac8334d71e221c50d8dbe236c.zip
Add 'cc' file type for saving bytecode.
Contributed by Sergey Bronnikov. #1105
-rw-r--r--doc/running.html3
-rw-r--r--src/jit/bcsave.lua4
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/running.html b/doc/running.html
index 3afc1b56..9dd2b411 100644
--- a/doc/running.html
+++ b/doc/running.html
@@ -120,7 +120,8 @@ file name:
120</p> 120</p>
121<ul> 121<ul>
122<li><tt>c</tt> &mdash; C source file, exported bytecode data.</li> 122<li><tt>c</tt> &mdash; C source file, exported bytecode data.</li>
123<li><tt>h</tt> &mdash; C header file, static bytecode data.</li> 123<li><tt>cc</tt> &mdash; C++ source file, exported bytecode data.</li>
124<li><tt>h</tt> &mdash; C/C++ header file, static bytecode data.</li>
124<li><tt>obj</tt> or <tt>o</tt> &mdash; Object file, exported bytecode data 125<li><tt>obj</tt> or <tt>o</tt> &mdash; Object file, exported bytecode data
125(OS- and architecture-specific).</li> 126(OS- and architecture-specific).</li>
126<li><tt>raw</tt> or any other extension &mdash; Raw bytecode file (portable). 127<li><tt>raw</tt> or any other extension &mdash; Raw bytecode file (portable).
diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua
index 74699f3d..390d297c 100644
--- a/src/jit/bcsave.lua
+++ b/src/jit/bcsave.lua
@@ -38,7 +38,7 @@ Save LuaJIT bytecode: luajit -b[options] input output
38 -- Stop handling options. 38 -- Stop handling options.
39 - Use stdin as input and/or stdout as output. 39 - Use stdin as input and/or stdout as output.
40 40
41File types: c h obj o raw (default) 41File types: c cc h obj o raw (default)
42]] 42]]
43 os.exit(1) 43 os.exit(1)
44end 44end
@@ -81,7 +81,7 @@ end
81------------------------------------------------------------------------------ 81------------------------------------------------------------------------------
82 82
83local map_type = { 83local map_type = {
84 raw = "raw", c = "c", h = "h", o = "obj", obj = "obj", 84 raw = "raw", c = "c", cc = "c", h = "h", o = "obj", obj = "obj",
85} 85}
86 86
87local map_arch = { 87local map_arch = {