Skip to content

Commit

Permalink
fix: resolve PR comments
Browse files Browse the repository at this point in the history
Add cp command in building docs
Remove CCACHE_USED macro
Disable PCH when using Clang and ccache
  • Loading branch information
StefanStojanovic committed Jan 31, 2025
1 parent e5639b0 commit 185bf60
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
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

```
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)', {
'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

0 comments on commit 185bf60

Please sign in to comment.