diff options
author | Mike Pall <mike> | 2023-10-21 13:31:45 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-10-21 13:31:45 +0200 |
commit | e826d0c101d750fac8334d71e221c50d8dbe236c (patch) | |
tree | b03865dccdc948f1b04f57d8452e139b733925f1 | |
parent | 4eb47df605883e983dadb78f303b22dd0232dd03 (diff) | |
download | luajit-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.html | 3 | ||||
-rw-r--r-- | src/jit/bcsave.lua | 4 |
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> — C source file, exported bytecode data.</li> | 122 | <li><tt>c</tt> — C source file, exported bytecode data.</li> |
123 | <li><tt>h</tt> — C header file, static bytecode data.</li> | 123 | <li><tt>cc</tt> — C++ source file, exported bytecode data.</li> |
124 | <li><tt>h</tt> — C/C++ header file, static bytecode data.</li> | ||
124 | <li><tt>obj</tt> or <tt>o</tt> — Object file, exported bytecode data | 125 | <li><tt>obj</tt> or <tt>o</tt> — 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 — Raw bytecode file (portable). | 127 | <li><tt>raw</tt> or any other extension — 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 | ||
41 | File types: c h obj o raw (default) | 41 | File types: c cc h obj o raw (default) |
42 | ]] | 42 | ]] |
43 | os.exit(1) | 43 | os.exit(1) |
44 | end | 44 | end |
@@ -81,7 +81,7 @@ end | |||
81 | ------------------------------------------------------------------------------ | 81 | ------------------------------------------------------------------------------ |
82 | 82 | ||
83 | local map_type = { | 83 | local 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 | ||
87 | local map_arch = { | 87 | local map_arch = { |