node/tools/code_cache/cache_builder.h
Joyee Cheung 4fd7193579 tools: implement mkcodecache as an executable
This patch implement a mkcodecache executable on top of the
`NativeModuleLoader` singleton.
This makes it possible to build a Node.js binary with embedded
code cache without building itself using the code cache stub -
the cache is now initialized by `NativeModuleEnv` instead which
can be refactored out of the mkcodecache dependencies.

PR-URL: https://github.com/nodejs/node/pull/27161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-16 18:23:32 -04:00

17 lines
360 B
C++

#ifndef TOOLS_CODE_CACHE_CACHE_BUILDER_H_
#define TOOLS_CODE_CACHE_CACHE_BUILDER_H_
#include <string>
#include "v8.h"
namespace node {
namespace native_module {
class CodeCacheBuilder {
public:
static std::string Generate(v8::Local<v8::Context> context);
};
} // namespace native_module
} // namespace node
#endif // TOOLS_CODE_CACHE_CACHE_BUILDER_H_