Skip to content

Commit

Permalink
build: remove precompiled header and debug information for host builds
Browse files Browse the repository at this point in the history
PR-URL: #42538
Refs: #42375
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
niyas-sait authored and juanarbol committed May 31, 2022
1 parent 071d34a commit 512dba6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
6 changes: 5 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@
'VCCLCompilerTool': {
'AdditionalOptions': ['/Zc:__cplusplus'],
'BufferSecurityCheck': 'true',
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
'target_conditions': [
['_toolset=="target"', {
'DebugInformationFormat': 1 # /Z7 embed info in .obj files
}],
],
'ExceptionHandling': 0, # /EHsc
'MultiProcessorCompilation': 'true',
'StringPooling': 'true', # pool string literals
Expand Down
17 changes: 12 additions & 5 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
'<(V8_ROOT)/src/builtins/builtins-intl-gen.cc',
],
}],
['OS=="win"', {
['OS=="win" and _toolset=="target"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
Expand Down Expand Up @@ -706,7 +706,7 @@
['want_separate_host_toolset', {
'toolsets': ['host', 'target'],
}],
['OS=="win"', {
['OS=="win" and _toolset=="target"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
Expand All @@ -733,7 +733,7 @@
['want_separate_host_toolset', {
'toolsets': ['host', 'target'],
}],
['OS=="win"', {
['OS=="win" and _toolset=="target"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
Expand Down Expand Up @@ -905,13 +905,20 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
],
}],
['OS=="win"', {
['v8_target_arch=="loong64"', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"loong64\\".*?sources \\+= ")',
],
}],
['OS=="win" and _toolset=="target"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
'<(_msvs_precompiled_header)',
'<(_msvs_precompiled_source)',
],
]
}],
['OS=="win"', {
# This will prevent V8's .cc files conflicting with the inspector's
# .cpp files in the same shard.
'msvs_settings': {
Expand Down

0 comments on commit 512dba6

Please sign in to comment.