Skip to content

Commit

Permalink
build: only define NODE_V8_OPTIONS if not empty
Browse files Browse the repository at this point in the history
Previously, V8::SetFlagsFromString was called on every launch even if
NODE_V8_OPTIONS was an empty string. This patch only defines
NODE_V8_OPTIONS if node_v8_options is not an empty string.

PR-URL: #2532
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
evanlucas authored and rvagg committed Aug 26, 2015
1 parent 0db0e53 commit 34de901
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
'defines': [
'NODE_ARCH="<(target_arch)"',
'NODE_PLATFORM="<(OS)"',
'NODE_V8_OPTIONS="<(node_v8_options)"',
'NODE_WANT_INTERNALS=1',
],

Expand All @@ -188,6 +187,9 @@
[ 'node_tag!=""', {
'defines': [ 'NODE_TAG="<(node_tag)"' ],
}],
[ 'node_v8_options!=""', {
'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
}],
# No node_main.cc for anything except executable
[ 'node_target_type!="executable"', {
'sources!': [
Expand Down

0 comments on commit 34de901

Please sign in to comment.