|
BuildCache
|
A program wrapper that wraps Lua scripts. More...
#include <lua_wrapper.hpp>
Classes | |
| class | runner_t |
Public Member Functions | |
| lua_wrapper_t (const file::exe_path_t &exe_path, const string_list_t &args, const std::string &lua_script_path) | |
| bool | can_handle_command () override |
| Check if this class implements a wrapper for the given command. More... | |
Public Member Functions inherited from bcache::program_wrapper_t | |
| bool | handle_command (int &return_code) |
| Try to wrap a program command. More... | |
Private Member Functions | |
| void | resolve_args () override |
| Resolve arguments on the command line. More... | |
| string_list_t | get_capabilities () override |
| Generate a list of supported capabilites. More... | |
| std::map< std::string, expected_file_t > | get_build_files () override |
| Get the paths to the files that are to be generated by the command. More... | |
| std::string | get_program_id () override |
| Get a string that uniquely identifies the program. More... | |
| string_list_t | get_relevant_arguments () override |
| Get relevant command line arguments for hashing. More... | |
| std::map< std::string, std::string > | get_relevant_env_vars () override |
| Get relevant environment variables for hashing. More... | |
| string_list_t | get_input_files () override |
| Get the paths to the input files for the command. More... | |
| std::string | preprocess_source () override |
| Generate the preprocessed source text. More... | |
| string_list_t | get_implicit_input_files () override |
| Get a list of paths to implicit input files. More... | |
| sys::run_result_t | run_for_miss () override |
| Run the actual command (when there is a cache miss). More... | |
Private Attributes | |
| runner_t | m_runner |
Additional Inherited Members | |
Protected Member Functions inherited from bcache::program_wrapper_t | |
| program_wrapper_t (const file::exe_path_t &exe_path, const string_list_t &args) | |
Protected Attributes inherited from bcache::program_wrapper_t | |
| const file::exe_path_t & | m_exe_path |
| const string_list_t & | m_args |
| capabilities_t | m_active_capabilities |
| Active capabilities. More... | |
A program wrapper that wraps Lua scripts.
This special wrapper class implements the wrapper API methods by redirecting the calls to the corrsponding methods in a Lua script.
|
overridevirtual |
Check if this class implements a wrapper for the given command.
Implements bcache::program_wrapper_t.
|
overrideprivatevirtual |
Get the paths to the files that are to be generated by the command.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Generate a list of supported capabilites.
The list of capabilites can contain zero or more of the following (case sensitive) strings:
| String | Meaning |
|---|---|
| create_target_dirs | Request creation of missing output dirs |
| direct_mode | Supports direct mode |
| hard_links | Can use hard links for cached files |
In order to support direct mode, get_input_files() and get_implicit_input_files() need to be implemented.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Get a list of paths to implicit input files.
This method is only used in direct mode, and the main use case is for collecting a list of all include files for C/C++ builds.
| runtime_error | if the request could not be completed. |
preprocess_source method has been called before calling this method (so the list can be collected during the preprocessing step and later be returned by this method). Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Get the paths to the input files for the command.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Get a string that uniquely identifies the program.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Get relevant command line arguments for hashing.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Get relevant environment variables for hashing.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Generate the preprocessed source text.
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Resolve arguments on the command line.
This method is called after can_handle_command, but before calling other methods that rely on the command line arguments. This gives a wrapper the opportunity to resolve special arguments so that they can be properly interpretade by later steps.
The primary use case of this method is to implement support for so called response files, which contain further command line arguments (this is common on Windows to work around the relativlely small command line length limit).
| runtime_error | if the request could not be completed. |
Reimplemented from bcache::program_wrapper_t.
|
overrideprivatevirtual |
Run the actual command (when there is a cache miss).
Reimplemented from bcache::program_wrapper_t.
1.8.17