summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-04-12 18:27:13 -0700
committerGitHub <noreply@github.com>2019-04-12 18:27:13 -0700
commit9495b338121140d585648d64fb99e8ef7f92f867 (patch)
tree57418b1f685a4a5a43ee291759f64e9a763b1245 /src/support
parent883d14de7157950063f74b81658d00df0d53be8d (diff)
downloadbinaryen-9495b338121140d585648d64fb99e8ef7f92f867.tar.gz
binaryen-9495b338121140d585648d64fb99e8ef7f92f867.tar.bz2
binaryen-9495b338121140d585648d64fb99e8ef7f92f867.zip
Move features from passOptions to Module (#2001)
This allows us to emit a (potentially modified) target features section and conditionally emit other sections such as the DataCount section based on the presence of features.
Diffstat (limited to 'src/support')
-rw-r--r--src/support/file.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/support/file.cpp b/src/support/file.cpp
index 2fe636cfd..c10646720 100644
--- a/src/support/file.cpp
+++ b/src/support/file.cpp
@@ -68,6 +68,9 @@ template std::vector<char> wasm::read_file<>(const std::string& , Flags::BinaryO
wasm::Output::Output(const std::string& filename, Flags::BinaryOption binary, Flags::DebugOption debug)
: outfile(), out([this, filename, binary, debug]() {
+ if (filename == "-") {
+ return std::cout.rdbuf();
+ }
std::streambuf *buffer;
if (filename.size()) {
if (debug == Flags::Debug) std::cerr << "Opening '" << filename << "'" << std::endl;