Skip to content

Commit ef6e04a

Browse files
deps: change V8 generated .h files for ccache
Prior to these changes compilation with ccache was broken because of the .h file regeneration in each compilation.
1 parent 528ac33 commit ef6e04a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

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

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/builtins/generate-bytecodes-builtins-list.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ void WriteBytecode(std::ofstream& out, Bytecode bytecode,
4141
void WriteHeader(const char* header_filename) {
4242
std::ofstream out(header_filename);
4343

44+
#ifdef CCACHE_USED
45+
// Write a cache invalidator to ensure that ccache does not cache this file.
46+
out << "#ifndef CACHE_INVALIDATOR\n"
47+
<< "#define CACHE_INVALIDATOR\n"
48+
<< "inline const char* cache_invalidator = __TIME__;\n"
49+
<< "#endif\n\n";
50+
#endif
51+
4452
out << "// Automatically generated from interpreter/bytecodes.h\n"
4553
<< "// The following list macro is used to populate the builtins list\n"
4654
<< "// with the bytecode handlers\n\n"

0 commit comments

Comments
 (0)