From nobody Wed Sep 13 15:37:21 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rm4MS3DQZz4syXR; Wed, 13 Sep 2023 15:37:24 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rm4MS2gVMz3QNj; Wed, 13 Sep 2023 15:37:24 +0000 (UTC) (envelope-from jbeich@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694619444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cRaTGVf1/cCnrtSk2jMO1RLzUz8K3XGWSrrbGbK+C9A=; b=iw2n7mkL0dWtiHqq2aNrfIVFEmvJ1VOybwV8kIhImRowV9fzPIjEbqnpu5B+McHO6ZUUaU POhvZ9VAZoTNlXdHLqMDBfAaLgKTLauzR48KXEx+sSIMDnNqzYdEoMgfACVa/EgFkfv6vx IBRHSfOD5vtuySZujdUotziRhl1spi6f1c9P+4LbS8O9xVvpvkDQ7VrvxFocSrixurcE6m SyTX7CgUFLdjHgfiGUQ1x44UTGZzQTCLFgrDqGczW7joT1mEfhffZKXa8vIjv/bpYM9A6R 4HYHXtoNhMaOiQJfw6CgfoVs1rxfQV1f+r6zLm9wl/fkod3GQSzxd3YLS49OvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694619444; a=rsa-sha256; cv=none; b=lERn4QvWESVw5KRr4ABcEDltNH58ME1WbsmSf6Ar7yTnYHI7tkStXEG466IAg/Cju9choj xeJwm16mD8cXS0c3/dcKFVDi9NgPCsrNCb47ok9FPZbYrmH9ESMM2uJDz+YsAdG4e82b7s ZTdowG8dpGft3URTH+21C5dGMWzP7NpoR/VNmBSwdLUxM5AKEO0oOPhv2/wItLzpRg9cWx +o+AEnAjk5MK6XD89RiS02lPIhkxNubIetlgPilInOVu1m6j5aINHPbADkZlqL5x5FIftS k4h5o70DFuqSUWTpqYD5lrhCt9ftBSiACMy906Yjk8iswEDbD3usBoWGN/54+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694619444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cRaTGVf1/cCnrtSk2jMO1RLzUz8K3XGWSrrbGbK+C9A=; b=NQj7hSOoWl8mjaQzp+f9jiIASyJjdOZWkaRI7RXSHgKtDEv9/pWHrPdsmmI7vX1+XEN5TS 9Pe2vaB6WhjCTQ6Gefyb3RZqEupoBCpDNOQxaIIiQsZmkk69LbF1xLyInbodZaKS+1WkBi uk/M2YnKFJdJmd96IJS3FvhqFibosQmHJCU/2cRRHzYNWeqlxsG056YnLPyjdGC99zYOlf h4dJAIaI4uNP7vvej5MhXwULDWDfLPRQ4XglAuaa+ZR7m0roVrIgv/qViXRD9D2g/+ohNx 155Y+Wf2YEqQ34qWVF6Yo/R30pWns7BPqcafSGFEk5fH34LNx2hFuagynDuR7w== Received: by freefall.freebsd.org (Postfix, from userid 1354) id 336319E2B; Wed, 13 Sep 2023 15:37:24 +0000 (UTC) From: Jan Beich To: Emmanuel Vadot Cc: Gleb Popov , "Tobias C. Berner" , 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 In-Reply-To: (Jan Beich's message of "Wed, 13 Sep 2023 16:56:30 +0200") References: <202309130518.38D5INm2018105@gitrepo.freebsd.org> <20230913102352.b641f29cd7cb76f2937d1a61@bidouilliste.com> Date: Wed, 13 Sep 2023 17:37:21 +0200 Message-ID: List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain Jan Beich writes: > Jan Beich writes: > >> Emmanuel Vadot writes: >> >>> On Wed, 13 Sep 2023 08:55:48 +0300 >>> Gleb Popov wrote: >>> >>>> On Wed, Sep 13, 2023 at 8:20?AM Tobias C. Berner 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. > > D37747 had TEST PLAN with "Actually test", SUMMARY with "Heavily WIP", > said :lib wasn't affected and limited port Clang to older base Clang. > The mini exp-run by a reviewer was limited to "the specific ports of interest" > thus didn't cover all consumers (let alone all ports). For example, > I've discovered this broke one of my ports: > > https://cgit.freebsd.org/ports/commit/?id=391f28644973 and https://cgit.freebsd.org/ports/commit/?id=07fe3d738b39 > The commit message is no better: didn't mention the new default is "export". > For example, FreeBSD >= 14.0 now uses port Clang 15 instead of base Clang 16. > This may degrade optimization slightly, assuming Clang improves each version. WITH_CCACHE_BUILD is also pessimized. Besides different Clang version, different Clang binary name (bin/clang15 vs. llvm15/bin/clang) there's also relative (using ccache via symlink in PATH) vs. absolute path.