Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: 0xd34df00d@×××××.com
Subject: Re: [gentoo-dev] Depending on clang as a compiler
Date: Wed, 26 Feb 2014 09:18:23
Message-Id: 20140226101806.61c095e0@pomiot.lan
In Reply to: Re: [gentoo-dev] Depending on clang as a compiler by Georg Rudoy <0xd34df00d@gmail.com>
1 Dnia 2014-02-26, o godz. 12:56:30
2 Georg Rudoy <0xd34df00d@×××××.com> napisał(a):
3
4 > 2014-02-26 12:52 GMT+04:00 Michał Górny <mgorny@g.o>:
5 > > Dnia 2014-02-26, o godz. 12:26:06
6 > > Georg Rudoy <0xd34df00d@×××××.com> napisał(a):
7 > >
8 > >> I'm currently considering using C++14 in my project, particularly
9 > >> features that aren't supported by gcc 4.8 and are barely supported by
10 > >> 4.9 [1], but the standard is already fully supported by clang 3.4 [2].
11 > >> Thus I wonder how bad is actually depending on recent clang in
12 > >> ebuilds?
13 > >
14 > > Well, you should note that DEPENDing on sys-devel/clang is currently
15 > > implemented as USE=clang in sys-devel/llvm (please don't depend on that
16 > > directly, we will split it back ASAP). So if someone doesn't have clang
17 > > enabled, he'd hit portage telling him to enable the flag.
18 >
19 > And what about setting CMAKE_CXX_COMPILER in src_configure() (or where
20 > it should be overriden)? I don't think it's a good idea to forcefully
21 > set the compiler binary in CMakeLists.txt itself, is it better done in
22 > ebuild?
23
24 I don't know CMake well but I think it's enough to set CXX before
25 calling cmake-utils_src_configure(). You gotta know the details better.
26 And yes, it's better done in ebuild, it will also make it easier to
27 support new enough gcc.
28
29 You may add some checks for necessary features in CMake though,
30 and fail explicitly when the compiler doesn't provide them.
31
32 --
33 Best regards,
34 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature