[LLVMbugs] [Bug 23197] New: Usage of "-fsyntax-only" in lib Tooling not compatible with cl driver mode
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 10 15:11:14 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23197
Bug ID: 23197
Summary: Usage of "-fsyntax-only" in lib Tooling not compatible
with cl driver mode
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: bugs.brainlab.eiband at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The string literal "-fsyntax-only" is used in several places of the clang code.
However this option is not a valid option in cl mode. Code which uses this
literal must be sure that the cl mode is not set. In cl mode the corresponding
option is "/Zs".
I am using clang tooling on windows in cl mode. The method
getClangSyntaxOnlyAdjuster() adds the option "-fsyntax-only" to clang tools
without checking for cl mode.
Result: A warning is shown that the option "-fsyntax-only" is not supported.
Expected result: No warning issued for options which were not specified on the
command line.
Two alternative changes fixed this issue for me:
A) Use "/Zs" instead of "-fsyntax-only" in function
getClangSyntaxOnlyAdjuster() when in cl mode.
B) Make -fsyntax-only a CoreOption in Options.td. Reading the sources, only
options with flags CLOption or CoreOption are valid in cl mode.
I am quite new to the LLVM/Clang code so I cannot say how an appropriate fix
would look like.
--
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/20150410/9e02c8ab/attachment.html>
More information about the llvm-bugs
mailing list