[LLVMbugs] [Bug 20977] New: UniversalDriver incorrectly removes the -flavor / -core switches from its command line
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Sep 17 07:53:14 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20977
Bug ID: 20977
Summary: UniversalDriver incorrectly removes the -flavor /
-core switches from its command line
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: llvm.mail.list at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
UniversalDriver.cpp, the getFlavor function.
When UniversalDriver finds -core or -flavor switch, it tries to remove it from
the command line so that it is not passed to the underlying drivers, such as
the GnuLdDriver. The removal logic is incorrect.
E.g., UniversalDriver does the following to remove -core:
argv++;
argc--;
There are two problems with that:
1) the switch does not necessarily go first in the command line - it can be in
the middle or at the end;
2) this ignores the fact that argv[0] is actually the program name, not a
switch or an option. Program name is skipped instead.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140917/e5c7b2c9/attachment.html>
More information about the llvm-bugs
mailing list