diff options
author | Alon Zakai <azakai@google.com> | 2019-06-21 09:14:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 09:14:06 -0700 |
commit | 3f797c82e49bb2a5e5f6bcd2393e369ef618a49b (patch) | |
tree | b71e6138626b60b721e83f7705e94486a671cb21 /src/tools | |
parent | 06698d7a32cb4eeb24fea942e83d1b15e86a73e6 (diff) | |
download | binaryen-3f797c82e49bb2a5e5f6bcd2393e369ef618a49b.tar.gz binaryen-3f797c82e49bb2a5e5f6bcd2393e369ef618a49b.tar.bz2 binaryen-3f797c82e49bb2a5e5f6bcd2393e369ef618a49b.zip |
Bysyncify: add ignore-imports and ignore-indirect options (#2178)
ignore-imports makes it not assume that any import may unwind/rewind the stack. ignore-indirect makes it not assume any indirect call can reach an unwind/rewind (which means, it assumes there is not an indirect call on the stack while unwinding).
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/optimization-options.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h index a07e585bd..9d8259077 100644 --- a/src/tools/optimization-options.h +++ b/src/tools/optimization-options.h @@ -187,12 +187,15 @@ struct OptimizationOptions : public ToolOptions { "in the form KEY@VALUE", Options::Arguments::N, [this](Options*, const std::string& argument) { + std::string key, value; auto colon = argument.find('@'); if (colon == std::string::npos) { - Fatal() << "--pass-arg value must be in the form of KEY@VALUE"; + key = argument; + value = "1"; + } else { + key = argument.substr(0, colon); + value = argument.substr(colon + 1); } - auto key = argument.substr(0, colon); - auto value = argument.substr(colon + 1); passOptions.arguments[key] = value; }); // add passes in registry |