http://llvm.org/bugs/show_bug.cgi?id=12703
Bug #: 12703
Summary: Using -Wl,<anything> causes Clang to emit an erroneous
error message
Product: clang
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: release blocker
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
You cannot use -Wl or -Xlinker if you also use -o on a compile/link line.
Example:
/usr/local/bin/clang++ -o system.hh.gch system.hh -Wl,-L/usr/local/lib
Outputs this error:
clang-3: error: cannot specify -o when generating multiple output files
This prevents me from adding anything to the link line from a simple compile
command (and yes, I could use -L here instead of -Wl,-L, but this isn't
actually why I'm using -Wl, I just wanted to make it more obvious that the
behavior is wrong).
Here is the code that's going wrong, Driver.cpp, around line 1189:
// It is an error to provide a -o option if we are making multiple output
// files.
if (FinalOutput) {
unsigned NumOutputs = 0;
for (ActionList::const_iterator it = C.getActions().begin(),
ie = C.getActions().end(); it != ie; ++it)
if ((*it)->getType() != types::TY_Nothing)
++NumOutputs;
if (NumOutputs > 1) {
Diag(clang::diag::err_drv_output_argument_with_multiple_files);
FinalOutput = 0;
}
}
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs