[LLVMbugs] [Bug 22748] New: Incorrect handling of /openmp- compiler option in --drive-mode=cl mode.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 2 01:11:49 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22748
Bug ID: 22748
Summary: Incorrect handling of /openmp- compiler option in
--drive-mode=cl mode.
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: eremeev at viva64.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
We were using a 3.5 clang for preprocessing of C/C++ source files intended for
Visual C++ cl.exe compiler. For this, we were utilizing a '--drive-mode=cl',
which should automatically interchange cl compiler options to their gcc/clang
analogs.
Now, several flags, such as '/openmp', for example, are unused by clang, so the
warning is generated. But it seems that '--drive-mode=cl' is unaware of
'/openmp-' option. In 3.5, it is still treated as an unknow option '/o penmp-'.
But, in the current trunk (3.7), the preprocessor starts treating '/openmp-' as
the output (-o) option of gcc/clang. This has some unforeseen consequences, as
we use clang for preprocessing and we are expecting it to behave like cl when
'--drive-mode=cl' is enabled - that is, starting
clang --driver-mode=cl /openmp- /P hello.cpp
We expect the preprocessed file (hello.i) to be generated in the current
directory. But, as the current trunk treat the '/openmp-' as /o penmp-, instead
we get the 'penmp-.i' file as the output of the preprocessor, which is
unexpected and incorrect from the cl.exe point of view.
--
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/20150302/07c37b1c/attachment.html>
More information about the llvm-bugs
mailing list