diff options
Diffstat (limited to 'src/passes/Asyncify.cpp')
-rw-r--r-- | src/passes/Asyncify.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp index 379452d42..1394cd015 100644 --- a/src/passes/Asyncify.cpp +++ b/src/passes/Asyncify.cpp @@ -199,6 +199,13 @@ // (aside from the asyncify.* imports, which are always assumed to). // Each entry can end in a '*' in which case it is matched as a prefix. // +// The list of imports can be a response file (which is convenient if it +// is long, or you don't want to bother escaping it on the commandline +// etc.), e.g. --pass-arg=asyncify-imports@@file.txt will load the +// contents of file.txt (note the double "@@" - the first is the +// separator for --pass-arg, and the second is the usual convention for +// indicating a response file). +// // --pass-arg=asyncify-ignore-imports // // Ignore all imports (except for bynsyncify.*), that is, assume none of @@ -241,6 +248,7 @@ #include "ir/module-utils.h" #include "ir/utils.h" #include "pass.h" +#include "support/file.h" #include "support/string.h" #include "support/unique_deferring_queue.h" #include "wasm-builder.h" @@ -1029,8 +1037,8 @@ struct Asyncify : public Pass { MemoryUtils::ensureExists(module->memory); // Find which things can change the state. - auto stateChangingImports = - runner->options.getArgumentOrDefault("asyncify-imports", ""); + auto stateChangingImports = String::trim(read_possible_response_file( + runner->options.getArgumentOrDefault("asyncify-imports", ""))); auto ignoreImports = runner->options.getArgumentOrDefault("asyncify-ignore-imports", ""); bool allImportsCanChangeState = |