From 01b23987405d8d7b2f13e40ef906169163ac2a5f Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Wed, 17 Jan 2018 18:25:49 +0100 Subject: Add optimize, shrink level and debug info options to C/JS (#1357) * Add optimize, shrink level and debug info options to C/JS * Add instantiate functionality for creating additional unique instances of the API * Use a workaround when running tests in node Tests misuse a module as a script by concatenating, so instead of catching this case in the library, catch it there * Update sieve test Seems optimized output changed due to running with optimize levels 2/1 now * Use the options with all pass runners * Update relooper-fuzz C-API test * Share defaults between tools and the C-API * Add a test for optimize levels * Unify node test support in check.by and auto_update_tests.py * Also add getters for optimize levels and test them * Also test debugInfo * Add debug info to C tests that used it as well * Fix missing NODEJS import in auto_update_tests * Detect node.js version (WASM support) * Update hello-world JS test (now also runs with node) * feature-test WebAssembly in node instead * Document that these options apply globally, and where * Make sure hello-world.js output doesn't differ between mozjs/node --- test/example/c-api-unused-mem.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'test/example/c-api-unused-mem.cpp') diff --git a/test/example/c-api-unused-mem.cpp b/test/example/c-api-unused-mem.cpp index 852e53b94..dd8fb2e8f 100644 --- a/test/example/c-api-unused-mem.cpp +++ b/test/example/c-api-unused-mem.cpp @@ -81,6 +81,7 @@ int main() { // check that binary read-write works { char buffer[1024]; + BinaryenSetDebugInfo(1); size_t size = BinaryenModuleWrite(the_module, buffer, 1024); printf("%d\n", size); BinaryenModuleRef copy = BinaryenModuleRead(buffer, size); -- cgit v1.2.3