summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-11-28 16:47:04 -0800
committerGitHub <noreply@github.com>2022-11-29 00:47:04 +0000
commiteeb838155dbff2fb6731f1ae5550cbb9494532fe (patch)
tree531f3900841cfd978d83723f09b92b6e9eefb9dd /src
parent2c0fb8c513b3534576383d250c593a9bd28347e3 (diff)
downloadbinaryen-eeb838155dbff2fb6731f1ae5550cbb9494532fe.tar.gz
binaryen-eeb838155dbff2fb6731f1ae5550cbb9494532fe.tar.bz2
binaryen-eeb838155dbff2fb6731f1ae5550cbb9494532fe.zip
Add a placeholder closed-world flag (#5298)
The flag does nothing so far.
Diffstat (limited to 'src')
-rw-r--r--src/tools/optimization-options.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h
index 8bca7639f..a1a21b596 100644
--- a/src/tools/optimization-options.h
+++ b/src/tools/optimization-options.h
@@ -241,6 +241,18 @@ struct OptimizationOptions : public ToolOptions {
OptimizationOptionsCategory,
Options::Arguments::Zero,
[this](Options*, const std::string&) { passOptions.fastMath = true; })
+ .add(
+ "--closed-world",
+ "-cw",
+ "Assume code outside of the module does not inspect or interact with "
+ "GC and function references, even if they are passed out. The outside "
+ "may hold on to them and pass them back in, but not inspect their "
+ "contents or call them.",
+ OptimizationOptionsCategory,
+ Options::Arguments::Zero,
+ [](Options*, const std::string&) {
+ // TODO: Implement this.
+ })
.add("--zero-filled-memory",
"-uim",
"Assume that an imported memory will be zero-initialized",