From nobody Mon Sep 15 22:35:23 2025 X-Original-To: dev-commits-src-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 4cQfxR6d7wz689nk; Mon, 15 Sep 2025 22:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQfxR54S4z3Wpy; Mon, 15 Sep 2025 22:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdGWKj5NI/svEmvfuD9OL2ROGdlSbmZTCKwWZgQ1QvY=; b=b+tWpguDPIRBhC3kOZGlyLMHm2cpLGWLoYKDUFQ7g1xN6yCsdJwPaypOSQsFKExkdtlVc0 Z4k632Sfa3OMFasCfp0PDcyaXXx/AHlC1V/RJoePPq0FGAEXmH+7SPpUySyNeSQ8XeqJh2 uFZ6bQz1c45KTITvK00bQcWEddLogHQZ+CLk1XVDLCybH7vL1+YN3Pn2U6eda1mgYbnMo4 UHtAhN2M1YgBW6f62li+fT3vs7Re8TI4LFnMMydcnNmoNe7zEoOPiJmlRdprxe64GaFIiA estMwaDEaP7nypCIuIeTi1NbZcKeIx21lGa1GyKsfi5MDfZVfhkVaHlurBc12g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757975723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdGWKj5NI/svEmvfuD9OL2ROGdlSbmZTCKwWZgQ1QvY=; b=JNftfUg1ma0xrOuddASEbfm8yCxlXo4O+R1BUU9jazHJxSJq2NBRZwVZ1uG7xcNY1NCIZQ H1J5OVZ+Lx+Sg233d2Vxt5v6vawWxkZunRNEly70aL21t6XR2eBRaU5yg6WmlNhuq8JvOn AosjQVcAuz8SUjCoP5heSXG817jDHB0VjeFXf1wIVUO2G0TphnW0s1iFop4R76evMbP62c Ll0HUL0b2reDRt3itLFgtHpxrPfDwEl/km71vp4rROs9rC2IwfnZA3nfcVKGRbG/G9u6bF Tw/ziEDZrYnqq7UYPRbHdF8ekJUFuq3y3l+ikfpPeywMcrrgzwto3UBhfvHGfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757975723; a=rsa-sha256; cv=none; b=pvBgRgp25iCKopSfXFfjWN4t+OUxR1k9JmdTiJ4/mQ5/rTZHSu1el/24soNLdM7L/B0QBl FD32vJTZZctp4ZvU+ROXZ/QsJ6TLKS5YvusJoADbL6Qnz2XM2qgWAyGiSkBsJS2/SUY+2Z 7kjcIDg1Ux6cnN5zGUKlc2CoOqPc5k3YqUWXVhdahVUaFakUyxcWPwM8savOFWPeZqvLVj aGpyM0uEXNJ8l/GQ5/+LY/D4CGzMnfBtKG4ysB7jOIau42A2URSRnjHGC6sH6kd2PMzFXy HJj1SHGkmqJ8cw4U11m3z7+Vd9KNjqSzdlxN07n6FznHgSXqfnFi653PIkFGVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cQfxR4gSKz1Chr; Mon, 15 Sep 2025 22:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58FMZNa4031244; Mon, 15 Sep 2025 22:35:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58FMZNu5031241; Mon, 15 Sep 2025 22:35:23 GMT (envelope-from git) Date: Mon, 15 Sep 2025 22:35:23 GMT Message-Id: <202509152235.58FMZNu5031241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: d61c75f634cf - main - libc++: avoid use of deprecated builtin List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d61c75f634cf52fdef9590601d881f85275eee9a Auto-Submitted: auto-generated The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=d61c75f634cf52fdef9590601d881f85275eee9a commit d61c75f634cf52fdef9590601d881f85275eee9a Author: Alex Richardson AuthorDate: 2025-09-15 22:10:07 +0000 Commit: Alex Richardson CommitDate: 2025-09-15 22:11:08 +0000 libc++: avoid use of deprecated builtin This pulls in LLVM commit accfbd4cb327411ad66c0109ba1841482b871967 to avoid the use of __libcpp_is_trivially_relocatable. This fixes building FreeBSD libc++ with clang HEAD as of today. Original commit message: [libc++] Replace __is_trivially_relocatable by is_trivially_copyable (#124970) The __is_trivially_relocatable builtin has semantics that do not correspond to any current or future notion of trivial relocation. Furthermore, it currently leads to incorrect optimizations for some types on supported compilers: - Clang on Windows where types with non-trivial destructors get incorrectly optimized - AppleClang where types with non-trivial move constructors get incorrectly optimized Until there is an agreed upon and bugfree implementation of what it means to be trivially relocatable, it is safer to simply use trivially copyable instead. This doesn't leave a lot of types behind and is definitely correct. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52529 --- .../libcxx/include/__type_traits/is_trivially_relocatable.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h b/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h index c0871731cc00..9b0e240de55f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h @@ -11,7 +11,6 @@ #include <__config> #include <__type_traits/enable_if.h> -#include <__type_traits/integral_constant.h> #include <__type_traits/is_same.h> #include <__type_traits/is_trivially_copyable.h> @@ -23,8 +22,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD // A type is trivially relocatable if a move construct + destroy of the original object is equivalent to // `memcpy(dst, src, sizeof(T))`. - -#if __has_builtin(__is_trivially_relocatable) +// +// Note that we don't use the __is_trivially_relocatable Clang builtin right now because it does not +// implement the semantics of any current or future trivial relocation proposal and it can lead to +// incorrect optimizations on some platforms (Windows) and supported compilers (AppleClang). +#if __has_builtin(__is_trivially_relocatable) && 0 template struct __libcpp_is_trivially_relocatable : integral_constant {}; #else