[LLVMbugs] [Bug 14755] New: clang driver passes inappropriate options to gcc -x assembler
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Dec 30 17:48:37 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14755
Bug #: 14755
Summary: clang driver passes inappropriate options to gcc -x
assembler
Product: clang
Version: 3.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: Driver
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: supercilious.dude at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
On windows (mingw), a clang 3.2 build does not call as from binutils directly
to assemble code, it calls gcc -x assembler instead. Normally, thats fine, and
trivial test cases compile OK, but when clang is invoked with an option that
GCC does not understand, like -Weverything clang still passes it to gcc,
causing:
i686-w64-mingw32-g++.exe: error: unrecognized command line option
'-Weverything'
clang++: error: assembler (via gcc) command failed with exit code 1 (use -v to
see invocation)
I wasnt able to figure out how to get clang to use as or i686-w64-mingw32-as
directly, but adding:
if (isa<AssembleJobAction>(JA) &&
A->getOption().matches(options::OPT_W_Group))
continue;
to the option check in gcc::Common::ConstructJob() in
clang/lib/Driver/Tools.cpp did the trick, and no warning options are passed.
Hopefully someone more knowledgeable about clang internals can make a better
change like the integrated assembler or at least using as.exe directly instead.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list