From 020cb4d510f6c92030f86f20048a4a297e57e987 Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Fri, 15 Oct 2021 19:31:55 +0200 Subject: [PATCH] Add optimization options --- c/tester.js | 4 +++- wasm/tester.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/c/tester.js b/c/tester.js index 940862f..de68981 100644 --- a/c/tester.js +++ b/c/tester.js @@ -46,7 +46,9 @@ async function compile (baseName, fileName, options) { if (options.r1cs) flags += "--r1cs "; if (options.json) flags += "--json "; if (options.output) flags += "--output " + options.output + " "; - + if (options.O === 0) flags += "--O0 " + if (options.O === 1) flags += "--O1 " + b = await exec("circom " + flags + fileName); assert(b.stderr == "", "circom compiler error \n" + b.stderr); diff --git a/wasm/tester.js b/wasm/tester.js index 5a50221..8a41daf 100644 --- a/wasm/tester.js +++ b/wasm/tester.js @@ -51,7 +51,9 @@ async function compile (fileName, options) { if (options.r1cs) flags += "--r1cs "; if (options.json) flags += "--json "; if (options.output) flags += "--output " + options.output + " "; - + if (options.O === 0) flags += "--O0 " + if (options.O === 1) flags += "--O1 " + b = await exec("circom " + flags + fileName); assert(b.stderr == "", "circom compiler error \n" + b.stderr);