Skip to content

Commit

Permalink
wasm: drop wasm_opt flag, it trips TSan and benefits are unclear. (en…
Browse files Browse the repository at this point in the history
…voyproxy#380)

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
  • Loading branch information
PiotrSikora authored and jplevyak committed Feb 3, 2020
1 parent 3903397 commit 01166b3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions source/extensions/common/wasm/v8/v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,13 @@
#include "v8-version.h"
#include "wasm-api/wasm.hh"

namespace v8 {
namespace internal {
extern bool FLAG_wasm_opt;
} // namespace internal
} // namespace v8

namespace Envoy {
namespace Extensions {
namespace Common {
namespace Wasm {
namespace V8 {

wasm::Engine* engine() {
// Enable Wasm optimizations.
v8::internal::FLAG_wasm_opt = true;

static const auto engine = wasm::Engine::make();
return engine.get();
}
Expand Down
Binary file modified test/extensions/common/wasm/test_data/test_rust.wasm
Binary file not shown.
9 changes: 0 additions & 9 deletions test/tools/wee8_compile/wee8_compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
#include "v8-version.h"
#include "wasm-api/wasm.hh"

namespace v8 {
namespace internal {
extern bool FLAG_wasm_opt;
} // namespace internal
} // namespace v8

uint32_t parseVarint(const byte_t*& pos, const byte_t* end) {
uint32_t n = 0;
uint32_t shift = 0;
Expand Down Expand Up @@ -142,9 +136,6 @@ wasm::vec<byte_t> stripWasmModule(const wasm::vec<byte_t>& module) {
}

wasm::vec<byte_t> serializeWasmModule(const char* path, const wasm::vec<byte_t>& content) {
// Enable Wasm optimizations.
v8::internal::FLAG_wasm_opt = true;

const auto engine = wasm::Engine::make();
if (engine == nullptr) {
std::cerr << "ERROR: Failed to start V8." << std::endl;
Expand Down

0 comments on commit 01166b3

Please sign in to comment.