Skip to content

Commit 25fb876

Browse files
niyas-saitxtx1130
authored andcommitted
build: remove precompiled header and debug information for host builds
PR-URL: nodejs#42538 Refs: nodejs#42375 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent d2cabd9 commit 25fb876

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

common.gypi

+5-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@
280280
'-std:c++17'
281281
],
282282
'BufferSecurityCheck': 'true',
283-
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
283+
'target_conditions': [
284+
['_toolset=="target"', {
285+
'DebugInformationFormat': 1 # /Z7 embed info in .obj files
286+
}],
287+
],
284288
'ExceptionHandling': 0, # /EHsc
285289
'MultiProcessorCompilation': 'true',
286290
'StringPooling': 'true', # pool string literals

tools/v8_gypfiles/v8.gyp

+7-5
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
'<(V8_ROOT)/src/builtins/builtins-intl-gen.cc',
328328
],
329329
}],
330-
['OS=="win"', {
330+
['OS=="win" and _toolset=="target"', {
331331
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
332332
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
333333
'sources': [
@@ -675,7 +675,7 @@
675675
],
676676
'sources': ['<@(v8_compiler_sources)'],
677677
'conditions': [
678-
['OS=="win"', {
678+
['OS=="win" and _toolset=="target"', {
679679
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
680680
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
681681
'sources': [
@@ -700,7 +700,7 @@
700700
],
701701
'sources': ['<@(v8_compiler_sources)'],
702702
'conditions': [
703-
['OS=="win"', {
703+
['OS=="win" and _toolset=="target"', {
704704
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
705705
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
706706
'sources': [
@@ -890,13 +890,15 @@
890890
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"loong64\\".*?sources \\+= ")',
891891
],
892892
}],
893-
['OS=="win"', {
893+
['OS=="win" and _toolset=="target"', {
894894
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
895895
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
896896
'sources': [
897897
'<(_msvs_precompiled_header)',
898898
'<(_msvs_precompiled_source)',
899-
],
899+
]
900+
}],
901+
['OS=="win"', {
900902
# This will prevent V8's .cc files conflicting with the inspector's
901903
# .cpp files in the same shard.
902904
'msvs_settings': {

0 commit comments

Comments
 (0)