Skip to content

Commit 4507246

Browse files
committed
deps,build: refactor v8 gypfiles
* make `generate_snapshot` into a target with no debug symbols on XCode * cleanup PR-URL: #26685 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 95e779a commit 4507246

File tree

4 files changed

+277
-319
lines changed

4 files changed

+277
-319
lines changed

deps/v8/gypfiles/extras-libraries.cc

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2011 Google Inc. All Rights Reserved.
2+
3+
// This file was generated from .js source files by GYP. If you
4+
// want to make changes to this file you should either change the
5+
// javascript source files or the GYP script.
6+
7+
#include "src/v8.h"
8+
#include "src/snapshot/natives.h"
9+
#include "src/utils.h"
10+
11+
namespace v8 {
12+
namespace internal {
13+
14+
static const char sources[] = { 40, 102, 117, 110, 99, 116, 105, 111, 110, 40, 41, 32, 123, 125, 41 };
15+
16+
template <>
17+
int NativesCollection<EXTRAS>::GetBuiltinsCount() {
18+
return 1;
19+
}
20+
21+
template <>
22+
int NativesCollection<EXTRAS>::GetIndex(const char* name) {
23+
if (strcmp(name, "dummy") == 0) return 0;
24+
return -1;
25+
}
26+
27+
template <>
28+
Vector<const char> NativesCollection<EXTRAS>::GetScriptSource(int index) {
29+
if (index == 0) return Vector<const char>(sources + 0, 15);
30+
return Vector<const char>("", 0);
31+
}
32+
33+
template <>
34+
Vector<const char> NativesCollection<EXTRAS>::GetScriptName(int index) {
35+
if (index == 0) return Vector<const char>("native dummy.js", 15);
36+
return Vector<const char>("", 0);
37+
}
38+
39+
template <>
40+
Vector<const char> NativesCollection<EXTRAS>::GetScriptsSource() {
41+
return Vector<const char>(sources, 15);
42+
}
43+
} // internal
44+
} // v8

deps/v8/gypfiles/inspector.gypi

+64-61
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44

55
{
66
'variables': {
7-
'protocol_path': '../third_party/inspector_protocol',
7+
'inspector_protocol_path': '../third_party/inspector_protocol',
88
'inspector_path': '../src/inspector',
9-
9+
'inspector_generated_output_root': '<(SHARED_INTERMEDIATE_DIR)/inspector-generated-output-root',
1010
'inspector_generated_sources': [
11-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Forward.h',
12-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.cpp',
13-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.h',
14-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.cpp',
15-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.h',
16-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.cpp',
17-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.h',
18-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.cpp',
19-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.h',
20-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.cpp',
21-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.h',
22-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.cpp',
23-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.h',
24-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.cpp',
25-
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.h',
26-
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Debugger.h',
27-
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Runtime.h',
28-
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Schema.h',
11+
'<(inspector_generated_output_root)/src/inspector/protocol/Forward.h',
12+
'<(inspector_generated_output_root)/src/inspector/protocol/Protocol.cpp',
13+
'<(inspector_generated_output_root)/src/inspector/protocol/Protocol.h',
14+
'<(inspector_generated_output_root)/src/inspector/protocol/Console.cpp',
15+
'<(inspector_generated_output_root)/src/inspector/protocol/Console.h',
16+
'<(inspector_generated_output_root)/src/inspector/protocol/Debugger.cpp',
17+
'<(inspector_generated_output_root)/src/inspector/protocol/Debugger.h',
18+
'<(inspector_generated_output_root)/src/inspector/protocol/HeapProfiler.cpp',
19+
'<(inspector_generated_output_root)/src/inspector/protocol/HeapProfiler.h',
20+
'<(inspector_generated_output_root)/src/inspector/protocol/Profiler.cpp',
21+
'<(inspector_generated_output_root)/src/inspector/protocol/Profiler.h',
22+
'<(inspector_generated_output_root)/src/inspector/protocol/Runtime.cpp',
23+
'<(inspector_generated_output_root)/src/inspector/protocol/Runtime.h',
24+
'<(inspector_generated_output_root)/src/inspector/protocol/Schema.cpp',
25+
'<(inspector_generated_output_root)/src/inspector/protocol/Schema.h',
26+
'<(inspector_generated_output_root)/include/inspector/Debugger.h',
27+
'<(inspector_generated_output_root)/include/inspector/Runtime.h',
28+
'<(inspector_generated_output_root)/include/inspector/Schema.h',
2929
],
3030

3131
'inspector_all_sources': [
@@ -83,45 +83,48 @@
8383
'../src/inspector/wasm-translation.h',
8484
]
8585
},
86-
'includes': [
87-
'../third_party/inspector_protocol/inspector_protocol.gypi',
88-
],
89-
'actions': [
90-
{
91-
'action_name': 'protocol_compatibility',
92-
'inputs': [
93-
'<(inspector_path)/js_protocol.pdl',
94-
],
95-
'outputs': [
96-
'<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp',
97-
],
98-
'action': [
99-
'python',
100-
'<(protocol_path)/check_protocol_compatibility.py',
101-
'--stamp', '<@(_outputs)',
102-
'<@(_inputs)',
103-
],
104-
'message': 'Checking inspector protocol compatibility',
105-
},
106-
{
107-
'action_name': 'protocol_generated_sources',
108-
'inputs': [
109-
'<(inspector_path)/js_protocol.pdl',
110-
'<(inspector_path)/inspector_protocol_config.json',
111-
'<@(inspector_protocol_files)',
112-
],
113-
'outputs': [
114-
'<@(inspector_generated_sources)',
115-
],
116-
'process_outputs_as_sources': 1,
117-
'action': [
118-
'python',
119-
'<(protocol_path)/code_generator.py',
120-
'--jinja_dir', '../third_party',
121-
'--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector',
122-
'--config', '<(inspector_path)/inspector_protocol_config.json',
123-
],
124-
'message': 'Generating inspector protocol sources from protocol json',
125-
},
126-
],
86+
'includes': [
87+
'../third_party/inspector_protocol/inspector_protocol.gypi',
88+
],
89+
'include_dirs': [
90+
'<(inspector_generated_output_root)',
91+
],
92+
'actions': [
93+
{
94+
'action_name': 'protocol_compatibility',
95+
'inputs': [
96+
'<(inspector_path)/js_protocol.pdl',
97+
],
98+
'outputs': [
99+
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
100+
],
101+
'action': [
102+
'python',
103+
'<(inspector_protocol_path)/check_protocol_compatibility.py',
104+
'--stamp', '<@(_outputs)',
105+
'<@(_inputs)',
106+
],
107+
'message': 'Checking inspector protocol compatibility',
108+
},
109+
{
110+
'action_name': 'protocol_generated_sources',
111+
'inputs': [
112+
'<(inspector_path)/js_protocol.pdl',
113+
'<(inspector_path)/inspector_protocol_config.json',
114+
'<@(inspector_protocol_files)',
115+
],
116+
'outputs': [
117+
'<@(inspector_generated_sources)',
118+
],
119+
'process_outputs_as_sources': 1,
120+
'action': [
121+
'python',
122+
'<(inspector_protocol_path)/code_generator.py',
123+
'--jinja_dir', '../third_party',
124+
'--output_base', '<(inspector_generated_output_root)/src/inspector',
125+
'--config', '<(inspector_path)/inspector_protocol_config.json',
126+
],
127+
'message': 'Generating inspector protocol sources from protocol json',
128+
},
129+
],
127130
}

deps/v8/gypfiles/toolchain.gypi

+6
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@
161161
}],
162162
],
163163
'target_defaults': {
164+
'include_dirs': [
165+
'..',
166+
'../include',
167+
],
164168
'conditions': [
165169
['v8_target_arch=="arm"', {
166170
'defines': [
@@ -1399,6 +1403,8 @@
13991403
4245, # Conversion with signed/unsigned mismatch.
14001404
4267, # Conversion with possible loss of data.
14011405
4324, # Padding structure due to alignment.
1406+
4351,
1407+
4355,
14021408
4701, # Potentially uninitialized local variable.
14031409
4702, # Unreachable code.
14041410
4703, # Potentially uninitialized local pointer variable.

0 commit comments

Comments
 (0)