Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 24 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,30 @@
},
}
],
["address_sanitizer != 'true' and thread_sanitizer != 'true'", {
'xcode_settings': {
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'DEAD_CODE_STRIPPING': 'YES', # -dead_strip

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Out of curiosity, can we know what dead code is being stripped away? There might be an opportunity to throw it out of source code as well. Of course, if it's not globally dead code but just code that's inactive in particular targets then that's obviously a different story…

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Well keeping the flag is about now and later:

  • the last commit removes the one dead signature it surfaced and the rest is the case you guessed (NAN header templates).
  • It means any dead code we introduce stops shipping in the binaries automatically.

},
"conditions": [
["OS == 'linux'", {
"cflags": [
"-fvisibility=hidden",
"-ffunction-sections",
"-fdata-sections",
],
"cflags_cc": ["-fvisibility-inlines-hidden"],
"ldflags": [ "-Wl,--gc-sections" ],
}],
["OS == 'win'", {
'msvs_settings': {
'VCLinkerTool': { 'OptimizeReferences': 2 }, # /OPT:REF
},
}],
],
}],
["address_sanitizer == 'true' and OS == 'mac'", {
'xcode_settings': {
'OTHER_CFLAGS+': [
Expand Down
5 changes: 0 additions & 5 deletions bindings/translate-heap-profile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ std::shared_ptr<Node> TranslateAllocationProfileToCpp(
return new_node;
}

v8::Local<v8::Value> TranslateAllocationProfile(
v8::AllocationProfile::Node* node) {
return HeapProfileTranslator().TranslateAllocationProfile(node);
}

v8::Local<v8::Value> TranslateAllocationProfile(
v8::AllocationProfile::Node* node,
const AllocationProfileNodeStatsMap* allocation_stats) {
Expand Down
2 changes: 0 additions & 2 deletions bindings/translate-heap-profile.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ std::shared_ptr<Node> TranslateAllocationProfileToCpp(
v8::AllocationProfile::Node* node);

v8::Local<v8::Value> TranslateAllocationProfile(Node* node);
v8::Local<v8::Value> TranslateAllocationProfile(
v8::AllocationProfile::Node* node);
v8::Local<v8::Value> TranslateAllocationProfile(
v8::AllocationProfile::Node* node,
const AllocationProfileNodeStatsMap* allocation_stats);
Expand Down
Loading