New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
condformats_serialization_generate.py: fix libClang ussage #5657
condformats_serialization_generate.py: fix libClang ussage #5657
Conversation
libClang is being used incorrectly. libClang does not understand what language you are attemping to compile, it assumes C/ObjC as default. This comes from headers.h name. Clang relies on correct extension to select a language, but it cannot be done with header file. Same extension is used for ObjC/C/C++. The first argument must not be none, but a patch to header file. An additional option must be passed '-xc++' to tell Clang that it will be C++. If the header file is passed as argument to libClang then the order of arguments is important! Otherwise libClang will ignore flags like -xc++, and go for the default. This behaviors are documented in Clang source code. Because of this on Darwin C++ exception handling is disabled, there is not need for in C front-end. Simply put you loose all default C++ language options. This resolves majority of ERROR: messages from condformats_serialization_generate.py A few a left, but are the same as in CLANG IBs. More people should join the effort to clean it up. Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
For reference the following are those errors:
|
A new Pull Request was created by @davidlt for CMSSW_7_3_X. condformats_serialization_generate.py: fix libClang ussage It involves the following packages: CondFormats/Serialization @ggovi, @cmsbuild, @apfeiffer1, @nclopezo can you please review it and eventually sign? Thanks. |
+1 |
@apfeiffer1 I think, it was always present. If you want concrete date/tag, I need to checkout Clang via GIT to find it fast. Do you want it? |
Thanks, |
Double tested this morning, not changes in |
…enerate.py CondFormats/Serialization -- condformats_serialization_generate.py: fix libClang ussage
libClang is being used incorrectly. libClang does not understand what
language you are attemping to compile, it assumes C/ObjC as default.
This comes from headers.h name. Clang relies on correct extension to
select a language, but it cannot be done with header file. Same
extension is used for ObjC/C/C++.
The first argument must not be none, but a patch to header file.
An additional option must be passed '-xc++' to tell Clang that
it will be C++.
If the header file is passed as argument to libClang then the order of
arguments is important! Otherwise libClang will ignore flags like -xc++,
and go for the default.
This behaviors are documented in Clang source code.
Because of this on Darwin C++ exception handling is disabled, there is
not need for in C front-end. Simply put you loose all default C++
language options.
This resolves majority of ERROR: messages from
condformats_serialization_generate.py
A few a left, but are the same as in CLANG IBs. More people should join
the effort to clean it up. There is <10 such issues, I might fix them. For
yet unknown reason their are not visible on standard CMSSW IB on Linux,
just on CLANG.
Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch