Skip to content

Commit 512dba6

Browse files
niyas-saitjuanarbol
authored andcommitted
build: remove precompiled header and debug information for host builds
PR-URL: #42538 Refs: #42375 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 071d34a commit 512dba6

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

common.gypi

+5-1
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

+12-5
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
'<(V8_ROOT)/src/builtins/builtins-intl-gen.cc',
343343
],
344344
}],
345-
['OS=="win"', {
345+
['OS=="win" and _toolset=="target"', {
346346
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
347347
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
348348
'sources': [
@@ -706,7 +706,7 @@
706706
['want_separate_host_toolset', {
707707
'toolsets': ['host', 'target'],
708708
}],
709-
['OS=="win"', {
709+
['OS=="win" and _toolset=="target"', {
710710
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
711711
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
712712
'sources': [
@@ -733,7 +733,7 @@
733733
['want_separate_host_toolset', {
734734
'toolsets': ['host', 'target'],
735735
}],
736-
['OS=="win"', {
736+
['OS=="win" and _toolset=="target"', {
737737
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
738738
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
739739
'sources': [
@@ -905,13 +905,20 @@
905905
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
906906
],
907907
}],
908-
['OS=="win"', {
908+
['v8_target_arch=="loong64"', {
909+
'sources': [
910+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"loong64\\".*?sources \\+= ")',
911+
],
912+
}],
913+
['OS=="win" and _toolset=="target"', {
909914
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
910915
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
911916
'sources': [
912917
'<(_msvs_precompiled_header)',
913918
'<(_msvs_precompiled_source)',
914-
],
919+
]
920+
}],
921+
['OS=="win"', {
915922
# This will prevent V8's .cc files conflicting with the inspector's
916923
# .cpp files in the same shard.
917924
'msvs_settings': {

0 commit comments

Comments
 (0)