Stream for object file must have binary flags.

This commit is contained in:
kai
2011-11-27 21:26:44 +01:00
parent 1c623594c1
commit 8db112dd68

View File

@@ -275,7 +275,7 @@ void writeModule(llvm::Module* m, std::string filename)
Logger::println("Writing object file to: %s\n", objpath.c_str());
std::string err;
{
llvm::raw_fd_ostream out(objpath.c_str(), err);
llvm::raw_fd_ostream out(objpath.c_str(), err, llvm::raw_fd_ostream::F_Binary);
if (err.empty())
{
emit_file(*gTargetMachine, *m, out, llvm::TargetMachine::CGFT_ObjectFile);