Skip to content

Commit 15e6156

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

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

common.gypi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,11 @@
286286
'VCCLCompilerTool': {
287287
'AdditionalOptions': ['/Zc:__cplusplus'],
288288
'BufferSecurityCheck': 'true',
289-
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
289+
'target_conditions': [
290+
['_toolset=="target"', {
291+
'DebugInformationFormat': 1 # /Z7 embed info in .obj files
292+
}],
293+
],
290294
'ExceptionHandling': 0, # /EHsc
291295
'MultiProcessorCompilation': 'true',
292296
'StringPooling': 'true', # pool string literals

tools/v8_gypfiles/v8.gyp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
'<(V8_ROOT)/src/builtins/builtins-intl-gen.cc',
323323
],
324324
}],
325-
['OS=="win"', {
325+
['OS=="win" and _toolset=="target"', {
326326
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
327327
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
328328
'sources': [
@@ -670,7 +670,7 @@
670670
],
671671
'sources': ['<@(v8_compiler_sources)'],
672672
'conditions': [
673-
['OS=="win"', {
673+
['OS=="win" and _toolset=="target"', {
674674
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
675675
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
676676
'sources': [
@@ -695,7 +695,7 @@
695695
],
696696
'sources': ['<@(v8_compiler_sources)'],
697697
'conditions': [
698-
['OS=="win"', {
698+
['OS=="win" and _toolset=="target"', {
699699
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
700700
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
701701
'sources': [
@@ -879,14 +879,16 @@
879879
'sources': [
880880
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
881881
],
882-
}],
883-
['OS=="win"', {
882+
}],
883+
['OS=="win" and _toolset=="target"', {
884884
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
885885
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
886886
'sources': [
887887
'<(_msvs_precompiled_header)',
888888
'<(_msvs_precompiled_source)',
889-
],
889+
]
890+
}],
891+
['OS=="win"', {
890892
# This will prevent V8's .cc files conflicting with the inspector's
891893
# .cpp files in the same shard.
892894
'msvs_settings': {

0 commit comments

Comments
 (0)