[llvm] r191985 - Fix object file writing in llvm-lto on Windows.
Rafael Espindola
rafael.espindola at gmail.com
Fri Oct 4 14:40:54 PDT 2013
Author: rafael
Date: Fri Oct 4 16:40:54 2013
New Revision: 191985
URL: http://llvm.org/viewvc/llvm-project?rev=191985&view=rev
Log:
Fix object file writing in llvm-lto on Windows.
We were writing in text mode.
Patch by Greg Bedwell.
Modified:
llvm/trunk/test/LTO/cfi_endproc.ll
llvm/trunk/test/LTO/lit.local.cfg
llvm/trunk/tools/llvm-lto/llvm-lto.cpp
Modified: llvm/trunk/test/LTO/cfi_endproc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LTO/cfi_endproc.ll?rev=191985&r1=191984&r2=191985&view=diff
==============================================================================
--- llvm/trunk/test/LTO/cfi_endproc.ll (original)
+++ llvm/trunk/test/LTO/cfi_endproc.ll Fri Oct 4 16:40:54 2013
@@ -4,9 +4,6 @@
; RUN: llvm-lto -o %t3 -exported-symbol=main %t1
; RUN: llvm-nm %t3 | FileCheck %s -check-prefix=EXPORT
-; FIXME: we can now build LTO on windows, debug why this fails.
-; XFAIL: win32
-
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Modified: llvm/trunk/test/LTO/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LTO/lit.local.cfg?rev=191985&r1=191984&r2=191985&view=diff
==============================================================================
--- llvm/trunk/test/LTO/lit.local.cfg (original)
+++ llvm/trunk/test/LTO/lit.local.cfg Fri Oct 4 16:40:54 2013
@@ -2,5 +2,5 @@ targets = set(config.root.targets_to_bui
if not 'X86' in targets:
config.unsupported = True
-if config.root.host_os in ['Cygwin', 'MingW', 'Windows']:
+if config.root.host_os in ['Cygwin']:
config.unsupported = True
Modified: llvm/trunk/tools/llvm-lto/llvm-lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-lto/llvm-lto.cpp?rev=191985&r1=191984&r2=191985&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-lto/llvm-lto.cpp (original)
+++ llvm/trunk/tools/llvm-lto/llvm-lto.cpp Fri Oct 4 16:40:54 2013
@@ -136,7 +136,8 @@ int main(int argc, char **argv) {
return 1;
}
- raw_fd_ostream FileStream(OutputFilename.c_str(), ErrorInfo);
+ raw_fd_ostream FileStream(OutputFilename.c_str(), ErrorInfo,
+ sys::fs::F_Binary);
if (!ErrorInfo.empty()) {
errs() << argv[0] << ": error opening the file '" << OutputFilename
<< "': " << ErrorInfo << "\n";
More information about the llvm-commits
mailing list