[PATCH] D26647: Identify object files compiled with cl.exe /GL.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 17:11:43 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286921: Identify object files compiled with cl.exe /GL. (authored by ruiu).
Changed prior to commit:
https://reviews.llvm.org/D26647?vs=77904&id=77924#toc
Repository:
rL LLVM
https://reviews.llvm.org/D26647
Files:
lld/trunk/COFF/Driver.cpp
lld/trunk/test/COFF/Inputs/cl-gl.obj
lld/trunk/test/COFF/cl-gl.test
Index: lld/trunk/test/COFF/cl-gl.test
===================================================================
--- lld/trunk/test/COFF/cl-gl.test
+++ lld/trunk/test/COFF/cl-gl.test
@@ -0,0 +1,4 @@
+# RUN: not lld-link /out:%t.exe /entry:main %S/Inputs/cl-gl.obj >& %t.log
+# RUN: FileCheck %s < %t.log
+
+# CHECK: is not a native COFF file. Recompile without /GL
Index: lld/trunk/COFF/Driver.cpp
===================================================================
--- lld/trunk/COFF/Driver.cpp
+++ lld/trunk/COFF/Driver.cpp
@@ -80,6 +80,9 @@
return std::unique_ptr<InputFile>(new ArchiveFile(MB));
if (Magic == file_magic::bitcode)
return std::unique_ptr<InputFile>(new BitcodeFile(MB));
+ if (Magic == file_magic::coff_cl_gl_object)
+ fatal(MB.getBufferIdentifier() + ": is not a native COFF file. "
+ "Recompile without /GL");
if (Config->OutputFile == "")
Config->OutputFile = getOutputPath(MB.getBufferIdentifier());
return std::unique_ptr<InputFile>(new ObjectFile(MB));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26647.77924.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161115/a3972f1f/attachment.bin>
More information about the llvm-commits
mailing list