diff --git a/node.gypi b/node.gypi index 7d6ff06128ac63..cbedd8028a5425 100644 --- a/node.gypi +++ b/node.gypi @@ -36,7 +36,7 @@ ], }, 'conditions': [ - ['clang==1', { + [ 'clang==1', { 'cflags': [ '-Werror=undefined-inline', ] }], [ 'node_shared=="false"', { @@ -68,7 +68,14 @@ }, { # POSIX 'defines': [ '__POSIX__' ], }], - + [ 'node_use_pch=="true"', { + 'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h', + 'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc', + 'sources': [ + '<(_msvs_precompiled_header)', + '<(_msvs_precompiled_source)', + ], + }], [ 'node_enable_d8=="true"', { 'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ], }], diff --git a/tools/msvs/pch/node_pch.cc b/tools/msvs/pch/node_pch.cc new file mode 100644 index 00000000000000..2b49436d626c43 --- /dev/null +++ b/tools/msvs/pch/node_pch.cc @@ -0,0 +1 @@ +#include "node_pch.h" diff --git a/tools/msvs/pch/node_pch.h b/tools/msvs/pch/node_pch.h new file mode 100644 index 00000000000000..5164f2f7fc946c --- /dev/null +++ b/tools/msvs/pch/node_pch.h @@ -0,0 +1,13 @@ +#pragma once +#include "aliased_buffer.h" +#include "base_object-inl.h" +#include "env-inl.h" +#include "node_internals.h" +#include "util-inl.h" +#include "uv.h" +#include "v8.h" + +#include +#include +#include +#include