<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang::driver::tools::gcc::Common::ConstructJob forwards -mllvm to gcc"
href="http://llvm.org/bugs/show_bug.cgi?id=15400">15400</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang::driver::tools::gcc::Common::ConstructJob forwards -mllvm to gcc
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>llvm@meinersbur.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Used for instance by the Generic_GCC toolchain assembler on mingw32:
<span class="quote">>clang hello.c -o hello.exe -mllvm -debug -target "i686-pc-mingw32" -v</span >
[...]
"C:/MinGW/bin/gcc.exe" -mllvm -debug -v -c -m32 -o
C:/Users/MEINER~1/AppData/Local/Temp/hello-417226.o -x assembler
C:/Users/MEINER~1/AppData/Local/Temp/hello-417225.s
gcc.exe: erreur: unrecognized command line option '-mllvm'
Utilisation des specs internes.
COLLECT_GCC=C:/MinGW/bin/gcc.exe
Target: mingw32
Configuré avec: ../gcc-4.7.2/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --disable-build-poststage1-with-cxx
--enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Modèle de thread: win32
gcc version 4.7.2 (GCC)
"C:/MinGW/bin/gcc.exe" -mllvm -debug -v -m32 -o hello.exe
C:/Users/MEINER~1/AppData/Local/Temp/hello-417226.o
gcc.exe: erreur: unrecognized command line option '-mllvm'
gcc.exe: erreur: C:/Users/MEINER~1/AppData/Local/Temp/hello-417226.o: No such
file or directory
Utilisation des specs internes.
COLLECT_GCC=C:/MinGW/bin/gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.2/lto-wrapper.exe
Target: mingw32
Configuré avec: ../gcc-4.7.2/configure
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --disable-build-poststage1-with-cxx
--enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Modèle de thread: win32
gcc version 4.7.2 (GCC)
clang: error: assembler (via gcc) command failed with exit code 1 (use -v to
see invocation)
This is triggered because of this function in Tools.cpp:
static bool forwardToGCC(const Option &O) {
return !O.hasFlag(options::NoForward) &&
!O.hasFlag(options::DriverOption) &&
!O.hasFlag(options::LinkerInput);
}
and in options.td:
def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option]>,
HelpText<"Additional arguments to forward to LLVM's option processing">;
should be:
def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option, NoForward]>,
HelpText<"Additional arguments to forward to LLVM's option processing">;
(or possibly DriverOption)
In contrast clang::driver::tools::linuxtools::Assemble::ConstructJob creates
its own command line for gcc.
Using clang r175978
Windows 7
Mingw gcc 4.7.2</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>