Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: resolve PR comments
Add cp command in building docs
Remove CCACHE_USED macro
Disable PCH when using Clang and ccache
  • Loading branch information
StefanStojanovic committed Feb 4, 2025
commit 11446b1d76677e9136885387fa87671060b48533
6 changes: 5 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,11 @@ Tips: follow <https://github.com/ccache/ccache/wiki/MS-Visual-Studio>, 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

```powershell
cp c:\ccache\ccache.exe c:\ccache\cl.exe
```

When building Node.js provide a path to your ccache via the option

Expand Down
3 changes: 0 additions & 3 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,6 @@
'NOMINMAX',
],
}],
['ccache_used == 1', {
'defines': ['CCACHE_USED',],
}],
[ 'OS in "linux freebsd openbsd solaris aix os400"', {
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
Expand Down
8 changes: 0 additions & 8 deletions deps/v8/src/builtins/generate-bytecodes-builtins-list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
'type': 'none',
'toolsets': ['host', 'target'],
'conditions': [
['OS=="win"', {
['OS == "win" and (clang != 1 or ccache_used != 1)', {
Comment thread
StefanStojanovic marked this conversation as resolved.
Resolved
'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',
Expand Down