diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index 305c81eab34..e782bc40642 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -339,9 +339,6 @@ 'target_defaults': { 'conditions': [ - ['v8_embedder_string!=""', { - 'defines': ['V8_EMBEDDER_STRING="<(v8_embedder_string)"',], - }], ['v8_enable_disassembler==1', { 'defines': ['ENABLE_DISASSEMBLER',], }], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 71b6772bc34..e3ab38b543e 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -558,6 +558,23 @@ ], }, }, # v8_version + { + 'target_name': 'v8_version_string', + 'type': 'static_library', + 'toolsets': ['host', 'target'], + 'dependencies': [ + 'v8_headers', + 'v8_libbase', + ], + 'sources': [ + '<(V8_ROOT)/src/utils/version.cc', + ], + 'conditions': [ + ['v8_embedder_string!=""', { + 'defines': ['V8_EMBEDDER_STRING="<(v8_embedder_string)"',], + }], + ], + }, # v8_version_string { 'target_name': 'v8_config_headers', 'type': 'none', @@ -1106,6 +1123,7 @@ 'v8_libbase', 'v8_shared_internal_headers', 'v8_version', + 'v8_version_string', 'cppgc_base', 'generate_bytecode_builtins_list', 'run_torque', @@ -1128,6 +1146,9 @@ '<@(inspector_all_sources)', ], + 'sources!': [ + '<(V8_ROOT)/src/utils/version.cc', # now compiled in v8_version_string target + ], 'conditions': [ ['v8_use_perfetto==1', { 'sources': [