Skip to content
Closed
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
fixup! tools: use per-process native Debug() printer in mkcodecache
  • Loading branch information
joyeecheung committed Feb 25, 2020
commit de4b6c71534023ef16c7af78f455df292ececf2d
20 changes: 20 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,16 @@
],

'conditions': [
[ 'node_use_openssl=="true"', {

@joyeecheung joyeecheung Feb 25, 2020 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that these are necessary for the headers (esp. enums) to match in mkcodecache and node_mksnapshot binaries - hopefully all these cruft can be cleaned up when #31074 is addressed, though the last time I tried SmartOS wouldn't link, sigh.

'defines': [
'HAVE_OPENSSL=1',
],
}],
['v8_enable_inspector==1', {
'defines': [
'HAVE_INSPECTOR=1',
],
}],
['OS=="win"', {
'libraries': [
'dbghelp.lib',
Expand Down Expand Up @@ -1269,6 +1279,16 @@
],

'conditions': [
[ 'node_use_openssl=="true"', {
'defines': [
'HAVE_OPENSSL=1',
],
}],
['v8_enable_inspector==1', {
'defines': [
'HAVE_INSPECTOR=1',
],
}],
['OS=="win"', {
'libraries': [
'Dbghelp.lib',
Expand Down
2 changes: 1 addition & 1 deletion tools/code_cache/cache_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const bool has_code_cache = true;
std::string size_str = FormatSize(cached_data->length);
std::string total_str = FormatSize(total);
per_process::Debug(DebugCategory::CODE_CACHE,
"Generated cache for %s, size = %s, total = %s",
"Generated cache for %s, size = %s, total = %s\n",
id.c_str(),
size_str.c_str(),
total_str.c_str());
Expand Down
3 changes: 3 additions & 0 deletions tools/code_cache/mkcodecache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <vector>

#include "cache_builder.h"
#include "debug_utils-inl.h"
#include "libplatform/libplatform.h"
#include "v8.h"

Expand Down Expand Up @@ -40,6 +41,8 @@ int main(int argc, char* argv[]) {
return 1;
}

node::per_process::enabled_debug_list.Parse(nullptr);

std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
v8::V8::InitializePlatform(platform.get());
v8::V8::Initialize();
Expand Down