After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698090 - scanner assumes clang is cl, the Microsoft compiler
scanner assumes clang is cl, the Microsoft compiler
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other other
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
: 721996 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-15 22:00 UTC by Patrick Wildt
Modified: 2015-02-07 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not misdetect clang as the Microsoft C compiler (1.14 KB, patch)
2013-05-02 01:49 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Patrick Wildt 2013-04-15 22:00:37 UTC
In giscanner/dumper.py the init function of the DumpCompiler class has a check for "cl" in the compiler command. If that matches, it does assume you're using a Microsoft compiler.

Unfortunately, clang also has cl as substring. Therefore Microsoft compiler arguments are passed to clang, which makes compiles fail.

See the following snippet, line 92:

>        if 'cl' in self._compiler_cmd:
>            self._pkgconfig_msvc_flags = '--msvc-syntax'

The if could be replaced with the following line:

>        if not 'clang' in self._compiler_cmd and 'cl' in self._compiler_cmd:

I don't know if there's a cleaner way to fix it.
Comment 1 Emmanuele Bassi (:ebassi) 2013-05-02 01:49:50 UTC
Created attachment 243017 [details] [review]
Do not misdetect clang as the Microsoft C compiler

Just because they both start with 'cl'.
Comment 2 Emmanuele Bassi (:ebassi) 2013-05-02 01:50:23 UTC
thanks Patrick. I ended up writing a slightly different patch.
Comment 3 Colin Walters 2013-05-02 02:02:13 UTC
Review of attachment 243017 [details] [review]:

Sure.
Comment 4 Emmanuele Bassi (:ebassi) 2013-05-02 02:05:49 UTC
Attachment 243017 [details] pushed as 863ceb7 - Do not misdetect clang as the Microsoft C compiler
Comment 5 Allison Karlitskaya (desrt) 2014-01-15 06:45:28 UTC
*** Bug 721996 has been marked as a duplicate of this bug. ***
Comment 6 André Klapper 2015-02-07 16:58:13 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]