From 9495b338121140d585648d64fb99e8ef7f92f867 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Fri, 12 Apr 2019 18:27:13 -0700 Subject: Move features from passOptions to Module (#2001) This allows us to emit a (potentially modified) target features section and conditionally emit other sections such as the DataCount section based on the presence of features. --- src/tools/wasm-ctor-eval.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/tools/wasm-ctor-eval.cpp') diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp index be1de7684..7509eb84f 100644 --- a/src/tools/wasm-ctor-eval.cpp +++ b/src/tools/wasm-ctor-eval.cpp @@ -425,7 +425,7 @@ int main(int argc, const char* argv[]) { } } - options.calculateFeatures(wasm); + options.applyFeatures(wasm); if (!WasmValidator().validate(wasm)) { WasmPrinter::printModule(&wasm); @@ -444,7 +444,6 @@ int main(int argc, const char* argv[]) { // Do some useful optimizations after the evalling { PassRunner passRunner(&wasm); - passRunner.setFeatures(options.passOptions.features); passRunner.add("memory-packing"); // we flattened it, so re-optimize passRunner.add("remove-unused-names"); passRunner.add("dce"); -- cgit v1.2.3