build,deps: use PCH also for v8_initializers

* rename files to represent reuse

PR-URL: https://github.com/nodejs/node/pull/25931
Reviewed-By: João Reis <reis@janeasystems.com>
This commit is contained in:
Refael Ackermann 2019-02-03 16:03:14 -05:00
parent 82b798907d
commit cd5c7bf240
5 changed files with 16 additions and 11 deletions

View File

@ -38,7 +38,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.11',
'v8_embedder_string': '-node.12',
##### V8 defaults for Node.js #####

View File

@ -222,7 +222,7 @@
'dependencies': [
'v8_base',
],
'variables': {
'variables': {
'optimize': 'max',
},
'include_dirs': [
@ -359,16 +359,20 @@
}],
# Platforms that don't have Compare-And-Swap support need to link atomic
# library to implement atomic memory access
[ 'v8_current_cpu == "mips" or v8_current_cpu == "mipsel" or '
'v8_current_cpu == "mips64" or v8_current_cpu == "mips64el" or '
'v8_current_cpu == "ppc" or v8_current_cpu == "ppc64" or '
'v8_current_cpu == "s390" or v8_current_cpu == "s390x"',
{
[ 'v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "ppc64", "s390", "s390x"]', {
'link_settings': {
'libraries': [ '-latomic', ],
},
},
],
['OS=="win" and node_use_pch == "true"', {
'msvs_precompiled_header': '../../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '../../../tools/msvs/pch/v8_pch.cc',
'sources': [
'<(_msvs_precompiled_header)',
'<(_msvs_precompiled_source)',
],
}],
],
}, # v8_initializers
{
@ -1942,10 +1946,11 @@
# See http://crbug.com/485155.
'msvs_shard': 4,
}, {
'msvs_precompiled_header': 'tools/msvs/pch/pch_v8_base.h',
'msvs_precompiled_source': '../../../tools/msvs/pch/pch_v8_base.cc',
'msvs_precompiled_header': '../../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '../../../tools/msvs/pch/v8_pch.cc',
'sources': [
'../../../tools/msvs/pch/pch_v8_base.cc',
'<(_msvs_precompiled_header)',
'<(_msvs_precompiled_source)',
],
}],
],

View File

@ -1 +0,0 @@
#include "pch_v8_base.h"

1
tools/msvs/pch/v8_pch.cc Normal file
View File

@ -0,0 +1 @@
#include "v8_pch.h"