diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-09-29 09:21:51 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-09-29 09:21:51 -0700 |
commit | f3e150d9a5a71a554a99c619ae5389f687c381ef (patch) | |
tree | 6f5145bfc48768fd858032b8a9a4295804d26a8f /backends/protobuf/protobuf.cc | |
parent | 79b6edb6397c530a7304eb4334f95324a4208aba (diff) | |
parent | ce0631c371f69f0132ea9ee4bc8f5ee576dbb1a3 (diff) | |
download | yosys-f3e150d9a5a71a554a99c619ae5389f687c381ef.tar.gz yosys-f3e150d9a5a71a554a99c619ae5389f687c381ef.tar.bz2 yosys-f3e150d9a5a71a554a99c619ae5389f687c381ef.zip |
Merge remote-tracking branch 'origin/master' into xaig_dff
Diffstat (limited to 'backends/protobuf/protobuf.cc')
-rw-r--r-- | backends/protobuf/protobuf.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/protobuf/protobuf.cc b/backends/protobuf/protobuf.cc index fff110bb0..671686173 100644 --- a/backends/protobuf/protobuf.cc +++ b/backends/protobuf/protobuf.cc @@ -266,7 +266,7 @@ struct ProtobufBackend : public Backend { } break; } - extra_args(f, filename, args, argidx); + extra_args(f, filename, args, argidx, !text_mode); log_header(design, "Executing Protobuf backend.\n"); @@ -338,7 +338,7 @@ struct ProtobufPass : public Pass { if (!filename.empty()) { rewrite_filename(filename); std::ofstream *ff = new std::ofstream; - ff->open(filename.c_str(), std::ofstream::trunc); + ff->open(filename.c_str(), text_mode ? std::ofstream::trunc : (std::ofstream::trunc | std::ofstream::binary)); if (ff->fail()) { delete ff; log_error("Can't open file `%s' for writing: %s\n", filename.c_str(), strerror(errno)); |