Commit a2462683 authored by bradnelson's avatar bradnelson Committed by Commit bot

Allowing optional build of a WASM prototype behind a gyp define.

Place a copy of the v8-native-prototype in third_party/wasm.
GYP_DEFINES='v8_wasm=1' gclient runhooks

BUG=None
TEST=None
R=titzer@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/1294543006

Cr-Commit-Position: refs/heads/master@{#30225}
parent cbbaf9ea
......@@ -64,6 +64,9 @@
# Set to 1 to enable DCHECKs in release builds.
'dcheck_always_on%': 0,
# Set to 1 to enable building with wasm prototype.
'v8_wasm%': 0,
},
'target_defaults': {
'conditions': [
......@@ -103,6 +106,9 @@
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
['v8_wasm!=0', {
'defines': ['V8_WASM',],
}],
], # conditions
'configurations': {
'DebugBaseCommon': {
......
......@@ -49,6 +49,10 @@
#include "src/v8.h"
#endif // !V8_SHARED
#if defined(V8_WASM)
#include "src/wasm/wasm-js.h"
#endif
#if !defined(_WIN32) && !defined(_WIN64)
#include <unistd.h> // NOLINT
#else
......@@ -1170,6 +1174,11 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
.ToLocalChecked(),
os_templ);
#if defined(V8_WASM)
// Install WASM API.
WasmJs::Install(isolate, global_template);
#endif
return global_template;
}
......
......@@ -98,6 +98,9 @@
'<(icu_gyp_path):icudata',
],
}],
['v8_wasm!=0', {
'include_dirs': ['../third_party/wasm'],
}],
],
},
{
......
......@@ -446,6 +446,14 @@ DEFINE_BOOL(turbo_frame_elision, true, "elide frames in TurboFan")
DEFINE_BOOL(turbo_cache_shared_code, true, "cache context-independent code")
DEFINE_BOOL(turbo_preserve_shared_code, false, "keep context-independent code")
#if defined(V8_WASM)
// Flags for native WebAssembly.
DEFINE_BOOL(trace_wasm_decoder, false, "trace decoding of wasm code")
DEFINE_BOOL(trace_wasm_compiler, false, "trace compiling of wasm code")
DEFINE_BOOL(wasm_break_on_decoder_error, false,
"debug break when wasm decoder encounters an error")
#endif
DEFINE_INT(typed_array_max_size_in_heap, 64,
"threshold for in-heap typed array")
......
......@@ -276,6 +276,11 @@
}, {
'dependencies': ['../../tools/gyp/v8.gyp:v8'],
}],
['v8_wasm!=0', {
'dependencies': [
'../../third_party/wasm/test/cctest/wasm/wasm.gyp:wasm_cctest'
],
}],
],
},
{
......
......@@ -163,6 +163,11 @@
],
},
}],
['v8_wasm!=0', {
'dependencies': [
'../../third_party/wasm/test/unittests/wasm/wasm.gyp:wasm_unittests',
],
}],
],
},
],
......
......@@ -1397,6 +1397,9 @@
}],
],
}],
['v8_wasm!=0', {
'dependencies': ['../../third_party/wasm/src/wasm/wasm.gyp:wasm'],
}],
],
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment