From 185bf60ee967cdb633520e4717987cfa2c886bb5 Mon Sep 17 00:00:00 2001 From: StefanStojanovic Date: Fri, 31 Jan 2025 15:23:39 +0100 Subject: [PATCH] fix: resolve PR comments Add cp command in building docs Remove CCACHE_USED macro Disable PCH when using Clang and ccache --- BUILDING.md | 6 +++++- common.gypi | 3 --- deps/v8/src/builtins/generate-bytecodes-builtins-list.cc | 8 -------- tools/v8_gypfiles/v8.gyp | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 2f55b16ee998b8..45d2c8c5482b61 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -579,7 +579,11 @@ Tips: follow , and you should notice that obj file will be bigger the normal one. First, install ccache, assume ccache install to c:\ccache, copy -c:\ccache\ccache.exe to c:\ccache\cl.exe +c:\ccache\ccache.exe to c:\ccache\cl.exe with this command + +``` +cp c:\ccache\ccache.exe c:\ccache\cl.exe +``` When building Node.js provide a path to your ccache via the option diff --git a/common.gypi b/common.gypi index f15654fdaa6943..1ad3c30629f394 100644 --- a/common.gypi +++ b/common.gypi @@ -484,9 +484,6 @@ 'NOMINMAX', ], }], - ['ccache_used == 1', { - 'defines': ['CCACHE_USED',], - }], [ 'OS in "linux freebsd openbsd solaris aix os400"', { 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], diff --git a/deps/v8/src/builtins/generate-bytecodes-builtins-list.cc b/deps/v8/src/builtins/generate-bytecodes-builtins-list.cc index f1fedbc2f06714..57f100727c06d5 100644 --- a/deps/v8/src/builtins/generate-bytecodes-builtins-list.cc +++ b/deps/v8/src/builtins/generate-bytecodes-builtins-list.cc @@ -41,14 +41,6 @@ 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" diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 9eaa1d219db1b5..35875afc6375e5 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -61,7 +61,7 @@ 'type': 'none', 'toolsets': ['host', 'target'], 'conditions': [ - ['OS=="win"', { + ['OS == "win" and (clang != 1 or ccache_used != 1)', { 'direct_dependent_settings': { 'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h', 'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',