Skip to content

Commit

Permalink
deps: change V8 generated .h files for ccache
Browse files Browse the repository at this point in the history
Prior to these changes compilation with ccache was broken because of
the .h file regeneration in each compilation.
  • Loading branch information
StefanStojanovic committed Jan 23, 2025
1 parent 414863d commit c07cc91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.12',
'v8_embedder_string': '-node.13',

##### V8 defaults for Node.js #####

Expand Down
8 changes: 8 additions & 0 deletions deps/v8/src/builtins/generate-bytecodes-builtins-list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ void WriteBytecode(std::ofstream& out, Bytecode bytecode,
void WriteHeader(const char* header_filename) {
std::ofstream out(header_filename);

#ifdef CCACHE_USED
// Write a cache invalidator to ensure that ccache does not cache this file.
out << "#ifndef CACHE_INVALIDATOR\n"
<< "#define CACHE_INVALIDATOR\n"
<< "inline const char* cache_invalidator = __TIME__;\n"
<< "#endif\n\n";
#endif

out << "// Automatically generated from interpreter/bytecodes.h\n"
<< "// The following list macro is used to populate the builtins list\n"
<< "// with the bytecode handlers\n\n"
Expand Down

0 comments on commit c07cc91

Please sign in to comment.