5 'v8_enable_pointer_compression%': 0,
6 'v8_enable_31bit_smis_on_64bit_arch%': 0,
7 'node_use_dtrace%': 'false',
8 'node_use_etw%': 'false',
9 'node_no_browser_globals%': 'false',
10 'node_use_node_snapshot%': 'false',
11 'node_use_v8_platform%': 'true',
12 'node_use_bundled_v8%': 'true',
13 'node_shared%': 'false',
14 'force_dynamic_crt%': 0,
16 'node_module_version%': '',
17 'node_shared_brotli%': 'false',
18 'node_shared_zlib%': 'false',
19 'node_shared_http_parser%': 'false',
20 'node_shared_cares%': 'false',
21 'node_shared_libuv%': 'false',
22 'node_shared_nghttp2%': 'false',
23 'node_use_openssl%': 'true',
24 'node_shared_openssl%': 'false',
25 'node_v8_options%': '',
26 'node_core_target_name%': 'node',
27 'node_lib_target_name%': 'libnode',
28 'node_intermediate_lib_type%': 'static_library',
29 'node_builtin_modules_path%': '',
31 'lib/internal/bootstrap/environment.js',
32 'lib/internal/bootstrap/loaders.js',
33 'lib/internal/bootstrap/node.js',
34 'lib/internal/bootstrap/pre_execution.js',
35 'lib/internal/bootstrap/switches/does_own_process_state.js',
36 'lib/internal/bootstrap/switches/does_not_own_process_state.js',
37 'lib/internal/bootstrap/switches/is_main_thread.js',
38 'lib/internal/bootstrap/switches/is_not_main_thread.js',
39 'lib/internal/per_context/primordials.js',
40 'lib/internal/per_context/domexception.js',
41 'lib/internal/per_context/messageport.js',
45 'lib/child_process.js',
59 'lib/_http_client.js',
60 'lib/_http_common.js',
61 'lib/_http_incoming.js',
62 'lib/_http_outgoing.js',
63 'lib/_http_server.js',
77 'lib/_stream_readable.js',
78 'lib/_stream_writable.js',
79 'lib/_stream_duplex.js',
80 'lib/_stream_transform.js',
81 'lib/_stream_passthrough.js',
82 'lib/_stream_wrap.js',
83 'lib/string_decoder.js',
89 'lib/trace_events.js',
96 'lib/worker_threads.js',
98 'lib/internal/assert.js',
99 'lib/internal/assert/assertion_error.js',
100 'lib/internal/assert/calltracker.js',
101 'lib/internal/async_hooks.js',
102 'lib/internal/buffer.js',
103 'lib/internal/cli_table.js',
104 'lib/internal/child_process.js',
105 'lib/internal/child_process/serialization.js',
106 'lib/internal/cluster/child.js',
107 'lib/internal/cluster/master.js',
108 'lib/internal/cluster/round_robin_handle.js',
109 'lib/internal/cluster/shared_handle.js',
110 'lib/internal/cluster/utils.js',
111 'lib/internal/cluster/worker.js',
112 'lib/internal/console/constructor.js',
113 'lib/internal/console/global.js',
114 'lib/internal/crypto/certificate.js',
115 'lib/internal/crypto/cipher.js',
116 'lib/internal/crypto/diffiehellman.js',
117 'lib/internal/crypto/hash.js',
118 'lib/internal/crypto/keygen.js',
119 'lib/internal/crypto/keys.js',
120 'lib/internal/crypto/pbkdf2.js',
121 'lib/internal/crypto/random.js',
122 'lib/internal/crypto/scrypt.js',
123 'lib/internal/crypto/sig.js',
124 'lib/internal/crypto/util.js',
125 'lib/internal/constants.js',
126 'lib/internal/dgram.js',
127 'lib/internal/dns/promises.js',
128 'lib/internal/dns/utils.js',
129 'lib/internal/dtrace.js',
130 'lib/internal/encoding.js',
131 'lib/internal/errors.js',
132 'lib/internal/error_serdes.js',
133 'lib/internal/event_target.js',
134 'lib/internal/fixed_queue.js',
135 'lib/internal/freelist.js',
136 'lib/internal/freeze_intrinsics.js',
137 'lib/internal/fs/dir.js',
138 'lib/internal/fs/promises.js',
139 'lib/internal/fs/read_file_context.js',
140 'lib/internal/fs/rimraf.js',
141 'lib/internal/fs/streams.js',
142 'lib/internal/fs/sync_write_stream.js',
143 'lib/internal/fs/utils.js',
144 'lib/internal/fs/watchers.js',
145 'lib/internal/http.js',
146 'lib/internal/heap_utils.js',
147 'lib/internal/histogram.js',
148 'lib/internal/idna.js',
149 'lib/internal/inspector_async_hook.js',
150 'lib/internal/js_stream_socket.js',
151 'lib/internal/linkedlist.js',
152 'lib/internal/main/check_syntax.js',
153 'lib/internal/main/eval_string.js',
154 'lib/internal/main/eval_stdin.js',
155 'lib/internal/main/inspect.js',
156 'lib/internal/main/print_help.js',
157 'lib/internal/main/prof_process.js',
158 'lib/internal/main/repl.js',
159 'lib/internal/main/run_main_module.js',
160 'lib/internal/main/run_third_party_main.js',
161 'lib/internal/main/worker_thread.js',
162 'lib/internal/modules/run_main.js',
163 'lib/internal/modules/package_json_reader.js',
164 'lib/internal/modules/cjs/helpers.js',
165 'lib/internal/modules/cjs/loader.js',
166 'lib/internal/modules/esm/loader.js',
167 'lib/internal/modules/esm/create_dynamic_module.js',
168 'lib/internal/modules/esm/get_format.js',
169 'lib/internal/modules/esm/get_source.js',
170 'lib/internal/modules/esm/module_job.js',
171 'lib/internal/modules/esm/module_map.js',
172 'lib/internal/modules/esm/resolve.js',
173 'lib/internal/modules/esm/transform_source.js',
174 'lib/internal/modules/esm/translators.js',
175 'lib/internal/net.js',
176 'lib/internal/options.js',
177 'lib/internal/policy/manifest.js',
178 'lib/internal/policy/sri.js',
179 'lib/internal/priority_queue.js',
180 'lib/internal/process/esm_loader.js',
181 'lib/internal/process/execution.js',
182 'lib/internal/process/per_thread.js',
183 'lib/internal/process/policy.js',
184 'lib/internal/process/promises.js',
185 'lib/internal/process/warning.js',
186 'lib/internal/process/worker_thread_only.js',
187 'lib/internal/process/report.js',
188 'lib/internal/process/signal.js',
189 'lib/internal/process/task_queues.js',
190 'lib/internal/querystring.js',
191 'lib/internal/readline/utils.js',
192 'lib/internal/repl.js',
193 'lib/internal/repl/await.js',
194 'lib/internal/repl/history.js',
195 'lib/internal/repl/utils.js',
196 'lib/internal/socket_list.js',
197 'lib/internal/source_map/prepare_stack_trace.js',
198 'lib/internal/source_map/source_map.js',
199 'lib/internal/source_map/source_map_cache.js',
200 'lib/internal/test/binding.js',
201 'lib/internal/timers.js',
202 'lib/internal/tls.js',
203 'lib/internal/trace_events_async_hooks.js',
204 'lib/internal/tty.js',
205 'lib/internal/url.js',
206 'lib/internal/util.js',
207 'lib/internal/util/comparisons.js',
208 'lib/internal/util/debuglog.js',
209 'lib/internal/util/inspect.js',
210 'lib/internal/util/inspector.js',
211 'lib/internal/util/types.js',
212 'lib/internal/http2/core.js',
213 'lib/internal/http2/compat.js',
214 'lib/internal/http2/util.js',
215 'lib/internal/v8_prof_polyfill.js',
216 'lib/internal/v8_prof_processor.js',
217 'lib/internal/validators.js',
218 'lib/internal/stream_base_commons.js',
219 'lib/internal/vm/module.js',
220 'lib/internal/worker.js',
221 'lib/internal/worker/io.js',
222 'lib/internal/worker/js_transferable.js',
223 'lib/internal/watchdog.js',
224 'lib/internal/streams/lazy_transform.js',
225 'lib/internal/streams/buffer_list.js',
226 'lib/internal/streams/duplexpair.js',
227 'lib/internal/streams/from.js',
228 'lib/internal/streams/legacy.js',
229 'lib/internal/streams/destroy.js',
230 'lib/internal/streams/state.js',
231 'lib/internal/streams/pipeline.js',
232 'lib/internal/streams/end-of-stream.js',
233 'deps/v8/tools/splaytree.js',
234 'deps/v8/tools/codemap.js',
235 'deps/v8/tools/consarray.js',
236 'deps/v8/tools/csvparser.js',
237 'deps/v8/tools/profile.js',
238 'deps/v8/tools/profile_view.js',
239 'deps/v8/tools/logreader.js',
240 'deps/v8/tools/arguments.js',
241 'deps/v8/tools/tickprocessor.js',
242 'deps/v8/tools/SourceMap.js',
243 'deps/v8/tools/tickprocessor-driver.js',
244 'deps/node-inspect/lib/_inspect.js',
245 'deps/node-inspect/lib/internal/inspect_client.js',
246 'deps/node-inspect/lib/internal/inspect_repl.js',
247 'deps/acorn/acorn/dist/acorn.js',
248 'deps/acorn/acorn-walk/dist/walk.js',
249 'deps/acorn-plugins/acorn-class-fields/index.js',
250 'deps/acorn-plugins/acorn-numeric-separator/index.js',
251 'deps/acorn-plugins/acorn-private-class-elements/index.js',
252 'deps/acorn-plugins/acorn-private-methods/index.js',
253 'deps/acorn-plugins/acorn-static-class-features/index.js',
254 'deps/cjs-module-lexer/lexer.js',
255 'deps/cjs-module-lexer/dist/lexer.js',
257 'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
258 'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)',
260 ['GENERATOR == "ninja"', {
261 'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o'
263 'node_text_start_object_path': 'node_text_start/src/large_pages/node_text_start.o'
265 [ 'node_shared=="true"', {
266 'node_target_type%': 'shared_library',
269 # For AIX, always generate static library first,
270 # It needs an extra step to generate exp and
271 # then use both static lib and exp to create
273 'node_intermediate_lib_type': 'static_library',
275 'node_intermediate_lib_type': 'shared_library',
279 'node_target_type%': 'executable',
282 'node_use_openssl=="true" and '
283 'node_shared_openssl=="false"', {
284 'use_openssl_def%': 1,
286 'use_openssl_def%': 0,
292 # Putting these explicitly here so not to depend on `common.gypi`.
293 # `common.gypi` need to be more general because it is used to build userland native addons.
294 # Refs: https://github.com/nodejs/node-gyp/issues/1118
295 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
301 '-Wno-unused-parameter',
302 '-Werror=undefined-inline',
306 # Relevant only for x86.
307 # Refs: https://github.com/nodejs/node/pull/25852
308 # Refs: https://docs.microsoft.com/en-us/cpp/build/reference/safeseh-image-has-safe-exception-handlers
311 'ImageHasSafeExceptionHandlers': 'false',
321 ['OS == "linux" and llvm_version != "0.0"', {
322 'libraries': ['-latomic'],
329 'target_name': 'node_text_start',
332 [ 'OS in "linux freebsd" and '
333 'target_arch=="x64"', {
334 'type': 'static_library',
336 'src/large_pages/node_text_start.S'
342 'target_name': '<(node_core_target_name)',
343 'type': 'executable',
346 'NODE_ARCH="<(target_arch)"',
347 'NODE_PLATFORM="<(OS)"',
348 'NODE_WANT_INTERNALS=1',
357 '<(lwnode_jsengine_path)/include'
365 'deps/histogram/histogram.gyp:histogram',
366 'deps/uvwasi/uvwasi.gyp:uvwasi',
371 'GenerateMapFile': 'true', # /MAP
372 'MapExports': 'true', # /MAPINFO:EXPORTS
373 'RandomizedBaseAddress': 2, # enable ASLR
374 'DataExecutionPrevention': 2, # enable DEP
375 'AllowIsolation': 'true',
379 # - "C4244: conversion from 'type1' to 'type2', possible loss of data"
380 # Ususaly safe. Disable for `dep`, enable for `src`
381 'msvs_disabled_warnings!': [4244],
384 [ 'error_on_warn=="true"', {
385 'cflags': ['-Werror'],
387 'WARNING_CFLAGS': [ '-Werror' ],
390 [ 'node_intermediate_lib_type=="static_library" and '
391 'node_shared=="true" and OS=="aix"', {
392 # For AIX, shared lib is linked by static lib and .exp. In the
393 # case here, the executable needs to link to shared lib.
394 # Therefore, use 'node_aix_shared' target to generate the
395 # shared lib and then executable.
396 'dependencies': [ 'node_aix_shared' ],
398 'dependencies': [ '<(node_lib_target_name)' ],
400 [ 'node_intermediate_lib_type=="static_library" and node_shared=="false"', {
403 '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
404 '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
409 'AdditionalOptions': [
410 '/WHOLEARCHIVE:<(node_lib_target_name)<(STATIC_LIB_SUFFIX)',
411 '/WHOLEARCHIVE:<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
416 ['lwnode=="false" and OS != "aix" and OS != "mac"', {
418 '-Wl,--whole-archive',
419 '<(obj_dir)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
420 '<(obj_dir)/tools/v8_gypfiles/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
421 '-Wl,--no-whole-archive',
425 'sources': [ 'src/res/node.rc' ],
427 [ 'node_use_etw=="true"', {
429 'tools/msvs/genfiles/node_etw_provider.rc'
436 [ 'node_shared=="true"', {
438 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
448 ['node_with_ltcg=="true"', {
450 'VCCLCompilerTool': {
451 'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG
454 'AdditionalOptions': [
455 '/LTCG:INCREMENTAL', # link time code generation
459 'OptimizeReferences': 2, # /OPT:REF
460 'EnableCOMDATFolding': 2, # /OPT:ICF
461 'LinkIncremental': 1, # disable incremental linking
462 'AdditionalOptions': [
463 '/LTCG:INCREMENTAL', # incremental link-time code generation
469 'VCCLCompilerTool': {
470 'WholeProgramOptimization': 'false'
473 'LinkIncremental': 2 # enable incremental linking
477 ['node_use_node_code_cache=="true"', {
483 'action_name': 'run_mkcodecache',
484 'process_outputs_as_sources': 1,
486 '<(mkcodecache_exec)',
489 '<(SHARED_INTERMEDIATE_DIR)/node_code_cache.cc',
499 'src/node_code_cache_stub.cc'
502 ['node_use_node_snapshot=="true"', {
508 'action_name': 'node_mksnapshot',
509 'process_outputs_as_sources': 1,
511 '<(node_mksnapshot_exec)',
514 '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc',
524 'src/node_snapshot_stub.cc'
527 [ 'OS in "linux freebsd" and '
528 'target_arch=="x64"', {
529 'dependencies': [ 'node_text_start' ],
531 '<(obj_dir)/<(node_text_start_object_path)'
535 }, # node_core_target_name
537 'target_name': '<(node_lib_target_name)',
538 'type': '<(node_intermediate_lib_type)',
545 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
548 'deps/histogram/histogram.gyp:histogram',
549 'deps/uvwasi/uvwasi.gyp:uvwasi',
553 'src/api/async_resource.cc',
554 'src/api/callback.cc',
555 'src/api/encoding.cc',
556 'src/api/environment.cc',
557 'src/api/exceptions.cc',
562 'src/connect_wrap.cc',
563 'src/connection_wrap.cc',
564 'src/debug_utils.cc',
566 'src/fs_event_wrap.cc',
567 'src/handle_wrap.cc',
570 'src/js_native_api.h',
571 'src/js_native_api_types.h',
572 'src/js_native_api_v8.cc',
573 'src/js_native_api_v8.h',
574 'src/js_native_api_v8_internals.h',
577 'src/js_udp_wrap.cc',
578 'src/module_wrap.cc',
581 'src/node_binding.cc',
582 'src/node_buffer.cc',
583 'src/node_config.cc',
584 'src/node_constants.cc',
585 'src/node_contextify.cc',
586 'src/node_credentials.cc',
588 'src/node_env_var.cc',
589 'src/node_errors.cc',
591 'src/node_http_parser.cc',
594 'src/node_main_instance.cc',
595 'src/node_messaging.cc',
596 'src/node_metadata.cc',
597 'src/node_native_module.cc',
598 'src/node_native_module_env.cc',
599 'src/node_options.cc',
602 'src/node_platform.cc',
603 'src/node_postmortem_metadata.cc',
604 'src/node_process_events.cc',
605 'src/node_process_methods.cc',
606 'src/node_process_object.cc',
607 'src/node_report.cc',
608 'src/node_report_module.cc',
609 'src/node_report_utils.cc',
610 'src/node_serdes.cc',
611 'src/node_sockaddr.cc',
612 'src/node_stat_watcher.cc',
613 'src/node_symbols.cc',
614 'src/node_task_queue.cc',
615 'src/node_trace_events.cc',
621 'src/node_watchdog.cc',
622 'src/node_worker.cc',
625 'src/process_wrap.cc',
626 'src/signal_wrap.cc',
628 'src/stream_base.cc',
629 'src/stream_pipe.cc',
630 'src/stream_wrap.cc',
631 'src/string_bytes.cc',
632 'src/string_decoder.cc',
635 'src/tracing/agent.cc',
636 'src/tracing/node_trace_buffer.cc',
637 'src/tracing/node_trace_writer.cc',
638 'src/tracing/trace_event.cc',
639 'src/tracing/traced_value.cc',
644 # headers to make for a more pleasant IDE experience
645 'src/aliased_buffer.h',
646 'src/aliased_struct.h',
647 'src/aliased_struct-inl.h',
648 'src/allocated_buffer.h',
649 'src/allocated_buffer-inl.h',
651 'src/async_wrap-inl.h',
653 'src/base_object-inl.h',
655 'src/callback_queue.h',
656 'src/callback_queue-inl.h',
657 'src/connect_wrap.h',
658 'src/connection_wrap.h',
660 'src/debug_utils-inl.h',
665 'src/histogram-inl.h',
668 'src/large_pages/node_large_page.cc',
669 'src/large_pages/node_large_page.h',
670 'src/memory_tracker.h',
671 'src/memory_tracker-inl.h',
675 'src/node_api_types.h',
676 'src/node_binding.h',
678 'src/node_constants.h',
679 'src/node_context_data.h',
680 'src/node_contextify.h',
684 'src/node_file-inl.h',
685 'src/node_http_common.h',
686 'src/node_http_common-inl.h',
688 'src/node_http2_state.h',
690 'src/node_internals.h',
691 'src/node_main_instance.h',
693 'src/node_mem-inl.h',
694 'src/node_messaging.h',
695 'src/node_metadata.h',
697 'src/node_native_module.h',
698 'src/node_native_module_env.h',
699 'src/node_object_wrap.h',
700 'src/node_options.h',
701 'src/node_options-inl.h',
703 'src/node_perf_common.h',
704 'src/node_platform.h',
705 'src/node_process.h',
708 'src/node_root_certs.h',
709 'src/node_sockaddr.h',
710 'src/node_sockaddr-inl.h',
711 'src/node_stat_watcher.h',
712 'src/node_union_bytes.h',
714 'src/node_version.h',
715 'src/node_v8_platform-inl.h',
717 'src/node_watchdog.h',
721 'src/req_wrap-inl.h',
724 'src/stream_base-inl.h',
727 'src/string_bytes.h',
728 'src/string_decoder.h',
729 'src/string_decoder-inl.h',
730 'src/string_search.h',
732 'src/tracing/agent.h',
733 'src/tracing/node_trace_buffer.h',
734 'src/tracing/node_trace_writer.h',
735 'src/tracing/trace_event.h',
736 'src/tracing/trace_event_common.h',
737 'src/tracing/traced_value.h',
743 '<(lwnode_jsengine_path)/include/v8.h',
744 # javascript files to make for an even more pleasant IDE experience
746 # node.gyp is added by default, common.gypi is added for change detection
751 'openssl_system_ca_path%': '',
752 'openssl_default_cipher_list%': '',
756 'NODE_ARCH="<(target_arch)"',
757 'NODE_PLATFORM="<(OS)"',
758 'NODE_WANT_INTERNALS=1',
759 # Warn when using deprecated V8 APIs.
760 'V8_DEPRECATION_WARNINGS=1',
761 'NODE_OPENSSL_SYSTEM_CERT_PATH="<(openssl_system_ca_path)"',
764 # - "C4244: conversion from 'type1' to 'type2', possible loss of data"
765 # Ususaly safe. Disable for `dep`, enable for `src`
766 'msvs_disabled_warnings!': [4244],
769 [ 'lwnode=="true"', {
771 '<(lwnode_jsengine_path)/escargotshim.gyp:escargotshim',
774 [ 'openssl_default_cipher_list!=""', {
776 'NODE_OPENSSL_DEFAULT_CIPHER_LIST="<(openssl_default_cipher_list)"'
779 [ 'error_on_warn=="true"', {
780 'cflags': ['-Werror'],
782 'WARNING_CFLAGS': [ '-Werror' ],
785 [ 'node_builtin_modules_path!=""', {
786 'defines': [ 'NODE_BUILTIN_MODULES_PATH="<(node_builtin_modules_path)"' ]
788 [ 'node_shared=="true"', {
790 'src/node_snapshot_stub.cc',
791 'src/node_code_cache_stub.cc',
794 [ 'node_shared=="true" and node_module_version!="" and OS!="win"', {
795 'product_extension': '<(shlib_suffix)',
797 'LD_DYLIB_INSTALL_NAME':
798 '@rpath/lib<(node_core_target_name).<(shlib_suffix)'
801 ['node_shared=="true" and OS=="aix"', {
802 'product_name': 'node_base',
804 [ 'v8_enable_inspector==1', {
805 'includes' : [ 'src/inspector/node_inspector.gypi' ],
807 'defines': [ 'HAVE_INSPECTOR=0' ]
811 [ 'node_intermediate_lib_type!="static_library"', {
823 [ 'node_use_etw=="true"', {
824 'defines': [ 'HAVE_ETW=1' ],
825 'dependencies': [ 'node_etw' ],
828 'tools/msvs/genfiles',
829 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
832 'src/node_win32_etw_provider.h',
833 'src/node_win32_etw_provider-inl.h',
834 'src/node_win32_etw_provider.cc',
836 'src/node_dtrace.cc',
837 'tools/msvs/genfiles/node_etw_provider.h',
840 ['node_intermediate_lib_type != "static_library"', {
842 'tools/msvs/genfiles/node_etw_provider.rc',
847 [ 'node_use_dtrace=="true"', {
848 'defines': [ 'HAVE_DTRACE=1' ],
850 'node_dtrace_header',
853 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
855 # DTrace is supported on linux, solaris, mac, and bsd. There are
856 # three object files associated with DTrace support, but they're
857 # not all used all the time:
859 # node_dtrace.o all configurations
860 # node_dtrace_ustack.o not supported on mac and linux
861 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
864 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
865 # actually exist. They're listed here to trick GYP into linking the
866 # corresponding object files into the final "node" executable. These
867 # object files are generated by "dtrace -G" using custom actions
868 # below, and the GYP-generated Makefiles will properly build them when
873 'src/node_dtrace.cc',
878 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
881 [ 'OS!="mac" and OS!="linux"', {
883 'src/node_dtrace_ustack.cc',
884 'src/node_dtrace_provider.cc',
889 [ 'node_use_openssl=="true"', {
891 'src/node_crypto.cc',
892 'src/node_crypto_common.cc',
893 'src/node_crypto_bio.cc',
894 'src/node_crypto_clienthello.cc',
896 'src/node_crypto_common.h',
897 'src/node_crypto_bio.h',
898 'src/node_crypto_clienthello.h',
899 'src/node_crypto_clienthello-inl.h',
900 'src/node_crypto_groups.h',
905 [ 'OS in "linux freebsd mac" and '
906 'target_arch=="x64" and '
907 'node_target_type=="executable"', {
908 'defines': [ 'NODE_ENABLE_LARGE_CODE_PAGES=1' ],
910 [ 'use_openssl_def==1', {
911 # TODO(bnoordhuis) Make all platforms export the same list of symbols.
912 # Teach mkssldef.py to generate linker maps that UNIX linkers understand.
915 # Categories to export.
916 '-CAES,BF,BIO,DES,DH,DSA,EC,ECDH,ECDSA,ENGINE,EVP,HMAC,MD4,MD5,'
917 'PSK,RC2,RC4,RSA,SHA,SHA0,SHA1,SHA256,SHA512,SOCK,STDIO,TLSEXT,'
918 'UI,FP_API,TLS1_METHOD,TLS1_1_METHOD,TLS1_2_METHOD,SCRYPT,OCSP,'
919 'NEXTPROTONEG,RMD160,CAST,DEPRECATEDIN_1_1_0,DEPRECATEDIN_1_2_0',
922 # Symbols to filter from the export list.
926 # Base generated DEF on zlib.def
927 '-Bdeps/zlib/win32/zlib.def'
931 ['openssl_fips!=""', {
932 'variables': { 'mkssldef_flags': ['-DOPENSSL_FIPS'] },
937 'action_name': 'mkssldef',
939 'deps/openssl/openssl/util/libcrypto.num',
940 'deps/openssl/openssl/util/libssl.num',
942 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/openssl.def'],
943 'process_outputs_as_sources': 1,
947 '<@(mkssldef_flags)',
958 'action_name': 'node_js2c',
959 'process_outputs_as_sources': 1,
961 # Put the code first so it's a dependency and can be used for invocation.
967 '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
970 'python', '<@(_inputs)',
971 '--target', '<@(_outputs)',
975 }, # node_lib_target_name
977 # generate ETW header and resource files
978 'target_name': 'node_etw',
981 [ 'node_use_etw=="true"', {
984 'action_name': 'node_etw',
985 'inputs': [ 'src/res/node_etw_provider.man' ],
987 'tools/msvs/genfiles/node_etw_provider.rc',
988 'tools/msvs/genfiles/node_etw_provider.h',
989 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
991 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
998 'target_name': 'node_dtrace_header',
1001 [ 'node_use_dtrace=="true" and OS!="linux"', {
1004 'action_name': 'node_dtrace_header',
1005 'inputs': [ 'src/node_provider.d' ],
1006 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
1007 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
1008 '-o', '<@(_outputs)' ]
1012 [ 'node_use_dtrace=="true" and OS=="linux"', {
1015 'action_name': 'node_dtrace_header',
1016 'inputs': [ 'src/node_provider.d' ],
1017 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
1018 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
1019 '-o', '<@(_outputs)' ]
1024 }, # node_dtrace_header
1026 'target_name': 'node_dtrace_provider',
1029 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
1032 'action_name': 'node_dtrace_provider_o',
1034 '<(obj_dir)/<(node_lib_target_name)/src/node_dtrace.o',
1037 '<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_provider.o'
1039 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
1040 '<@(_inputs)', '-o', '<@(_outputs)' ]
1044 [ 'node_use_dtrace=="true" and OS=="linux"', {
1047 'action_name': 'node_dtrace_provider_o',
1048 'inputs': [ 'src/node_provider.d' ],
1050 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
1053 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
1059 }, # node_dtrace_provider
1061 'target_name': 'node_dtrace_ustack',
1064 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
1067 'action_name': 'node_dtrace_ustack_constants',
1069 '<(obj_dir)/tools/v8_gypfiles/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)'
1072 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
1075 'tools/genv8constants.py',
1081 'action_name': 'node_dtrace_ustack',
1084 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
1087 '<(obj_dir)/<(node_lib_target_name)/src/node_dtrace_ustack.o'
1090 [ 'target_arch=="ia32" or target_arch=="arm"', {
1092 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
1093 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
1096 [ 'target_arch=="x64"', {
1098 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
1099 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
1107 }, # node_dtrace_ustack
1109 'target_name': 'specialize_node_d',
1112 [ 'node_use_dtrace=="true"', {
1115 'action_name': 'specialize_node_d',
1120 '<(PRODUCT_DIR)/node.d',
1123 'tools/specialize_node_d.py',
1133 }, # specialize_node_d
1135 'target_name': 'fuzz_url',
1136 'type': 'executable',
1138 '<(node_lib_target_name)',
1147 'NODE_ARCH="<(target_arch)"',
1148 'NODE_PLATFORM="<(OS)"',
1149 'NODE_WANT_INTERNALS=1',
1152 'src/node_snapshot_stub.cc',
1153 'src/node_code_cache_stub.cc',
1154 'test/fuzzers/fuzz_url.cc',
1158 'ldflags': [ '-fsanitize=fuzzer' ]
1160 # Ensure that ossfuzz flag has been set and that we are on Linux
1161 [ 'OS!="linux" or ossfuzz!="true"', {
1167 'target_name': 'fuzz_env',
1168 'type': 'executable',
1170 '<(node_lib_target_name)',
1171 'deps/histogram/histogram.gyp:histogram',
1172 'deps/uvwasi/uvwasi.gyp:uvwasi',
1173 'node_dtrace_header',
1174 'node_dtrace_ustack',
1175 'node_dtrace_provider',
1182 'tools/msvs/genfiles',
1183 '<(lwnode_jsengine_path)/include',
1184 'deps/cares/include',
1186 'deps/uvwasi/include',
1190 'NODE_ARCH="<(target_arch)"',
1191 'NODE_PLATFORM="<(OS)"',
1192 'NODE_WANT_INTERNALS=1',
1195 'src/node_snapshot_stub.cc',
1196 'src/node_code_cache_stub.cc',
1197 'test/fuzzers/fuzz_env.cc',
1201 'ldflags': [ '-fsanitize=fuzzer' ]
1203 # Ensure that ossfuzz flag has been set and that we are on Linux
1204 [ 'OS!="linux" or ossfuzz!="true"', {
1210 'target_name': 'cctest',
1211 'type': 'executable',
1214 '<(node_lib_target_name)',
1215 'deps/histogram/histogram.gyp:histogram',
1216 'deps/uvwasi/uvwasi.gyp:uvwasi',
1217 'node_dtrace_header',
1218 'node_dtrace_ustack',
1219 'node_dtrace_provider',
1228 'tools/msvs/genfiles',
1229 '<(lwnode_jsengine_path)/include',
1230 'deps/cares/include',
1232 'deps/uvwasi/include',
1237 'NODE_ARCH="<(target_arch)"',
1238 'NODE_PLATFORM="<(OS)"',
1239 'NODE_WANT_INTERNALS=1',
1243 'src/node_snapshot_stub.cc',
1244 'src/node_code_cache_stub.cc',
1245 'test/cctest/gtest/gtest-all.cc',
1246 'test/cctest/gtest/gtest_main.cc',
1247 'test/cctest/node_test_fixture.cc',
1248 'test/cctest/node_test_fixture.h',
1249 'test/cctest/test_aliased_buffer.cc',
1250 'test/cctest/test_base64.cc',
1251 'test/cctest/test_base_object_ptr.cc',
1252 'test/cctest/test_node_postmortem_metadata.cc',
1253 'test/cctest/test_environment.cc',
1254 'test/cctest/test_linked_binding.cc',
1255 'test/cctest/test_per_process.cc',
1256 'test/cctest/test_platform.cc',
1257 'test/cctest/test_json_utils.cc',
1258 'test/cctest/test_sockaddr.cc',
1259 'test/cctest/test_traced_value.cc',
1260 'test/cctest/test_util.cc',
1261 'test/cctest/test_url.cc',
1265 [ 'node_use_openssl=="true"', {
1270 ['v8_enable_inspector==1', {
1272 'test/cctest/test_inspector_socket.cc',
1273 'test/cctest/test_inspector_socket_server.cc'
1284 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
1286 # Skip cctest while building shared lib node for Windows
1287 [ 'OS=="win" and node_shared=="true"', {
1290 [ 'node_shared=="true"', {
1292 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
1306 'target_name': 'embedtest',
1307 'type': 'executable',
1310 '<(node_lib_target_name)',
1311 'deps/histogram/histogram.gyp:histogram',
1312 'deps/uvwasi/uvwasi.gyp:uvwasi',
1313 'node_dtrace_header',
1314 'node_dtrace_ustack',
1315 'node_dtrace_provider',
1324 'tools/msvs/genfiles',
1325 '<(lwnode_jsengine_path)/include',
1326 'deps/cares/include',
1328 'deps/uvwasi/include',
1333 'src/node_snapshot_stub.cc',
1334 'src/node_code_cache_stub.cc',
1335 'test/embedding/embedtest.cc',
1340 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
1342 # Skip cctest while building shared lib node for Windows
1343 [ 'OS=="win" and node_shared=="true"', {
1346 [ 'node_shared=="true"', {
1348 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
1361 # TODO(joyeecheung): do not depend on node_lib,
1362 # instead create a smaller static library node_lib_base that does
1363 # just enough for node_native_module.cc and the cache builder to
1364 # compile without compiling the generated code cache C++ file.
1365 # So generate_code_cache -> mkcodecache -> node_lib_base,
1366 # node_lib -> node_lib_base & generate_code_cache
1368 'target_name': 'mkcodecache',
1369 'type': 'executable',
1372 '<(node_lib_target_name)',
1373 'deps/histogram/histogram.gyp:histogram',
1374 'deps/uvwasi/uvwasi.gyp:uvwasi',
1383 'tools/msvs/genfiles',
1384 '<(lwnode_jsengine_path)/include',
1385 'deps/cares/include',
1387 'deps/uvwasi/include',
1391 'NODE_WANT_INTERNALS=1'
1394 'src/node_snapshot_stub.cc',
1395 'src/node_code_cache_stub.cc',
1396 'tools/code_cache/mkcodecache.cc',
1397 'tools/code_cache/cache_builder.cc',
1398 'tools/code_cache/cache_builder.h',
1402 [ 'node_use_openssl=="true"', {
1407 ['v8_enable_inspector==1', {
1423 'target_name': 'node_mksnapshot',
1424 'type': 'executable',
1427 '<(node_lib_target_name)',
1428 'deps/histogram/histogram.gyp:histogram',
1429 'deps/uvwasi/uvwasi.gyp:uvwasi',
1438 'tools/msvs/genfiles',
1439 '<(lwnode_jsengine_path)/include',
1440 'deps/cares/include',
1442 'deps/uvwasi/include',
1445 'defines': [ 'NODE_WANT_INTERNALS=1' ],
1448 'src/node_snapshot_stub.cc',
1449 'src/node_code_cache_stub.cc',
1450 'tools/snapshot/node_mksnapshot.cc',
1451 'tools/snapshot/snapshot_builder.cc',
1452 'tools/snapshot/snapshot_builder.h',
1456 [ 'node_use_openssl=="true"', {
1461 ['v8_enable_inspector==1', {
1474 }, # node_mksnapshot
1478 ['OS=="aix" and node_shared=="true"', {
1481 'target_name': 'node_aix_shared',
1482 'type': 'shared_library',
1483 'product_name': '<(node_core_target_name)',
1484 'ldflags': ['--shared'],
1485 'product_extension': '<(shlib_suffix)',
1489 'dependencies': ['<(node_lib_target_name)'],
1492 '<(lwnode_jsengine_path)/include',
1495 '<@(library_files)',
1498 'direct_dependent_settings': {
1499 'ldflags': [ '-Wl,-brtl' ],
1503 }], # end aix section
1504 ], # end conditions block