Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2023 13:22:50 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        Gleb Popov <arrowd@freebsd.org>, "Tobias C. Berner" <tcberner@freebsd.org>, ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 4df0e66a3662 - main - llvm.mk: add export/noexport to handle CC/CXX/CPP exports
Message-ID:  <zg1q-fhbp-wny@FreeBSD.org>
In-Reply-To: <20230913102352.b641f29cd7cb76f2937d1a61@bidouilliste.com> (Emmanuel Vadot's message of "Wed, 13 Sep 2023 10:23:52 %2B0200")
References:  <202309130518.38D5INm2018105@gitrepo.freebsd.org> <CALH631mauenLxm13nmEo9SCyqGMu2yRJ9C-gjjJ9yS4Wg0L33g@mail.gmail.com> <20230913102352.b641f29cd7cb76f2937d1a61@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Emmanuel Vadot <manu@bidouilliste.com> writes:

> On Wed, 13 Sep 2023 08:55:48 +0300
> Gleb Popov <arrowd@freebsd.org> wrote:
>
>> On Wed, Sep 13, 2023 at 8:20?AM Tobias C. Berner <tcberner@freebsd.org> wrote:
>> >
>> > +  USES=llvm.mk now supports 'export' (default) and 'noexport' arguments.
>> > +  When export is set, CC, CXX and CPP will be set to the path corresponding
>> > +  to the chosen llvm-version.
>> 
>> The choice for the default seems strange to me. Now every port that
>> has USES=llvm will be switching to building with a non-base compiler.
>> Is this really a sensible default?
>
>  Isn't that what you want when you add USES=llvm ?

Changing CC is USES=compiler job. Contributors starting using USES=llvm
for changing Clang version because USES=compiler is poorly maintained.

I predominantly add USES=llvm to satisfy libLLVM (mesa-devel, rpcs3) or
libclang (USES=cargo + CARGO_CRATES=bindgen). In a few cases when I need
newer Clang (for C++20 std:ranges, C++23) I also need newer libc++ but
devel/llvm* maintainer refuses to provide libc++ (bug 260139).

Forcing CC/CXX/CPP without testing all consumers has a chance of
introducing regressions. For example, when using LTO it's important to
make sure CMake doesn't pick up /usr/bin/llvm-ar or /usr/bin/llvm-ranlib
because those may not support LLVM bitcode used by devel/llvm*.

https://cgit.freebsd.org/ports/commit/?id=5e71e4d45129
https://cgit.freebsd.org/ports/commit/?id=2ce01a07d7c9

While the affected ports had LTO enabled by default there's also
WITH_LTO knob handled by /usr/ports/Mk/Features/lto.mk.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zg1q-fhbp-wny>