From nobody Fri Oct 18 12:47:07 2024 X-Original-To: dev-commits-ports-all@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 4XVPbw0S13z5Z95l; Fri, 18 Oct 2024 12:47:08 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVPbw02tlz4Hl7; Fri, 18 Oct 2024 12:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729255628; 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=n/QDcx3BnGG9hoYDRD10uLsmCWRHkpQl/nrsGV4vACk=; b=AkcKU0twuTMayCK8mRT47jT8zyLfBxal5wZF2F55TUiAb0Aym+z/PgTNs/zbIW0OOLFGLI MeGLsGceFMsmq64CqlraE7P56VfBnuA9gIPE+Z8WmjMyhqTnR7IQg2lZErGaoXIRpJdpi7 mK3DGGQbGge2mKOGGyJrJZdEd7BhrabmXaMpm2kpF0tJSB6nwniE62ddtJbAVfcBIpAEfW RZA9KPxPE24wMWcFeCd9bjFp2oi1JEF91Q9SNqDEqfeEn0B8cK4aYfhYZ6OmE+vwJ3hseZ ypKjaUZpU+ID7fieo9wWjuhdGIEgQcvd/UjZ5qPYt7UXCXJOa0VYqtqcbI0roQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729255628; 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=n/QDcx3BnGG9hoYDRD10uLsmCWRHkpQl/nrsGV4vACk=; b=jDyVgSbtWHu2k2ZEkYCo6DRqFlR2aScqykul+2vre/S9gWMZdU432gobHNOkGfofmywyj0 Lai/h0NCz+5BW2LcwfsseDpyrurAMLN/GPxsX+N5L/W5wjbl1kYC8JWLS4wyZpA2NHJbPn qClLYX7P4Haj4no5Q1Zeu/FYmUYenUiMQ5yU24xcyvyPKYZYdoG/R4hQfQp89waAHl20f7 5OTmzRSa+2S+5lxjjAdNwnhpgbH5dH1nhCwKQTsoIxS4MbVn9mwLX8+LqmOf/O3QTRMjQB 7KdwTsj8cG5uATnq8GwafXkUNZmnaniYWWaOiVm7vmNYp7h8//BSEWdMsEOgJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729255628; a=rsa-sha256; cv=none; b=ox7rukHO3K+731EF2X2eeUIZQTQA7s5KbdaNZ9BXbWvvKmXcKyxQEOeEuBxOGlYfcNKyPG E1s3nfojr1JuHewzlR/APRxC34EuK5JDAoGxtGMC+bORkwMtZmm+uxtmCouYwkmlrA296m 0u9YDrlCWJiNDP/ejJnQOn6H8AQyv6UdhJh3GMQ+KfLjJNRUMPaBM4vydglfVVoULA0vBY lSw4I7ff6/37HIzoq+vYLgidwL9zDpThwo3kQDvkhVob6Ga5WSv849zXSDK8SmC2Wusob+ VGMEz/uASwU3XcQ8+wUhO13E2CPv7+m7y9hfw87PnQyJJV3hcRJCDxCAsbqPvw== 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 4XVPbv6lkHzYqp; Fri, 18 Oct 2024 12:47:07 +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 49ICl7EU096286; Fri, 18 Oct 2024 12:47:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49ICl7CJ096283; Fri, 18 Oct 2024 12:47:07 GMT (envelope-from git) Date: Fri, 18 Oct 2024 12:47:07 GMT Message-Id: <202410181247.49ICl7CJ096283@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Charlie Li Subject: git: 84b600fb9f63 - main - wasi: update to latest commit past sdk-22 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vishwin X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84b600fb9f63e0961632dae0d90186b1586fd901 Auto-Submitted: auto-generated The branch main has been updated by vishwin: URL: https://cgit.FreeBSD.org/ports/commit/?id=84b600fb9f63e0961632dae0d90186b1586fd901 commit 84b600fb9f63e0961632dae0d90186b1586fd901 Author: Charlie Li AuthorDate: 2024-10-18 12:38:20 +0000 Commit: Charlie Li CommitDate: 2024-10-18 12:38:20 +0000 wasi: update to latest commit past sdk-22 devel/wasi-libc is now flavourised per supported LLVM version. Each flavour includes/copies the corresponding clang's stdarg.h and stddef.h instead of simply using the latest clang release. Technically upstream dropped support for LLVM < 18, but the commit doing so admittedly operated under an uncertain assumption. LLVM 17 is still supported in these ports for the benefit of Rust and gecko@ ports, which specify LLVM 17 minimum, and to facilitate LTO with that version. LLVM 19 is also supported in this version, with the corresponding ports to be committed separately. Bump PORTREVISION of consumers --- devel/wasi-compiler-rt/Makefile | 23 +- devel/wasi-compiler-rt17/Makefile | 2 +- devel/wasi-compiler-rt18/Makefile | 1 + devel/wasi-libc/Makefile | 15 +- devel/wasi-libc/distinfo | 6 +- .../wasi-libc/files/llvm17/__stddef_max_align_t.h | 27 +++ devel/wasi-libc/files/llvm17/stdarg.h | 51 +++++ devel/wasi-libc/files/llvm17/stddef.h | 133 +++++++++++ .../files/{ => llvm18}/__stdarg___gnuc_va_list.h | 0 .../files/{ => llvm18}/__stdarg___va_copy.h | 0 .../wasi-libc/files/{ => llvm18}/__stdarg_va_arg.h | 0 .../files/{ => llvm18}/__stdarg_va_copy.h | 0 .../files/{ => llvm18}/__stdarg_va_list.h | 0 .../files/{ => llvm18}/__stddef_max_align_t.h | 0 devel/wasi-libc/files/{ => llvm18}/__stddef_null.h | 0 .../files/{ => llvm18}/__stddef_nullptr_t.h | 0 .../files/{ => llvm18}/__stddef_offsetof.h | 0 .../files/{ => llvm18}/__stddef_ptrdiff_t.h | 0 .../files/{ => llvm18}/__stddef_rsize_t.h | 0 .../wasi-libc/files/{ => llvm18}/__stddef_size_t.h | 0 .../files/{ => llvm18}/__stddef_unreachable.h | 4 + .../files/{ => llvm18}/__stddef_wchar_t.h | 0 .../wasi-libc/files/{ => llvm18}/__stddef_wint_t.h | 0 devel/wasi-libc/files/{ => llvm18}/stdarg.h | 0 devel/wasi-libc/files/{ => llvm18}/stddef.h | 0 .../files/llvm19/__stdarg___gnuc_va_list.h | 13 ++ devel/wasi-libc/files/llvm19/__stdarg___va_copy.h | 12 + .../wasi-libc/files/llvm19/__stdarg_header_macro.h | 12 + devel/wasi-libc/files/llvm19/__stdarg_va_arg.h | 22 ++ devel/wasi-libc/files/llvm19/__stdarg_va_copy.h | 12 + devel/wasi-libc/files/llvm19/__stdarg_va_list.h | 13 ++ .../wasi-libc/files/llvm19/__stddef_header_macro.h | 12 + .../wasi-libc/files/llvm19/__stddef_max_align_t.h | 27 +++ devel/wasi-libc/files/llvm19/__stddef_null.h | 29 +++ devel/wasi-libc/files/llvm19/__stddef_nullptr_t.h | 29 +++ devel/wasi-libc/files/llvm19/__stddef_offsetof.h | 17 ++ devel/wasi-libc/files/llvm19/__stddef_ptrdiff_t.h | 20 ++ devel/wasi-libc/files/llvm19/__stddef_rsize_t.h | 20 ++ devel/wasi-libc/files/llvm19/__stddef_size_t.h | 20 ++ .../wasi-libc/files/llvm19/__stddef_unreachable.h | 21 ++ devel/wasi-libc/files/llvm19/__stddef_wchar_t.h | 28 +++ devel/wasi-libc/files/llvm19/__stddef_wint_t.h | 15 ++ devel/wasi-libc/files/llvm19/stdarg.h | 75 +++++++ devel/wasi-libc/files/llvm19/stddef.h | 139 ++++++++++++ devel/wasi-libc/pkg-plist | 238 -------------------- devel/wasi-libc/pkg-plist17 | 233 +++++++++++++++++++ devel/wasi-libc/pkg-plist18 | 247 ++++++++++++++++++++ devel/wasi-libc/pkg-plist19 | 249 +++++++++++++++++++++ devel/wasi-libcxx/Makefile | 24 +- devel/wasi-libcxx17/Makefile | 2 +- devel/wasi-libcxx18/Makefile | 1 + mail/thunderbird/Makefile | 1 + www/firefox-esr/Makefile | 1 + www/firefox/Makefile | 1 + www/librewolf/Makefile | 1 + www/tor-browser/Makefile | 2 +- www/waterfox/Makefile | 2 +- 57 files changed, 1528 insertions(+), 272 deletions(-) diff --git a/devel/wasi-compiler-rt/Makefile b/devel/wasi-compiler-rt/Makefile index 89fa972ac97e..352058337db0 100644 --- a/devel/wasi-compiler-rt/Makefile +++ b/devel/wasi-compiler-rt/Makefile @@ -18,14 +18,13 @@ LICENSE_NAME= Apache License 2.0 with LLVM Exceptions LICENSE_FILE= ${WRKSRC}/llvm/LICENSE.TXT LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -BUILD_DEPENDS= ${WASI_SYSROOT}/include/stdarg.h:devel/wasi-libc - USES= cmake tar:xz .if ${DISTVERSION} == 0 IGNORE= is a meta-port; there is nothing to build PKGNAMESUFFIX= -master .else +BUILD_DEPENDS= ${WASI_SYSROOT}/include/stdarg.h:devel/wasi-libc@${LLVM_VERSION} USES+= llvm:${LLVM_SUFFIX} .endif @@ -34,32 +33,36 @@ LLVM_SUFFIX= ${LLVM_RELEASE:C/\.[0-9]\.[0-9]$//} DISTINFO_FILE= ${PORTSDIR}/${LLVM_PORT}/distinfo NO_ARCH= yes -CC= ${LOCALBASE}/bin/clang${LLVM_VERSION} -CXX= ${LOCALBASE}/bin/clang++${LLVM_VERSION} WASI_SYSROOT= ${LOCALBASE}/share/wasi-sysroot TRIPLE= wasm32-wasi WITHOUT_CPU_CFLAGS= yes # try to sync with https://github.com/WebAssembly/wasi-sdk -# Makefile and wasi-sdk.cmake +# wasi-sdk.cmake and cmake/wasi-sdk-sysroot.cmake CMAKE_SOURCE_PATH= ${WRKSRC}/compiler-rt/lib/builtins -CMAKE_ARGS= -DCMAKE_AR=${LOCALBASE}/bin/llvm-ar${LLVM_VERSION} \ +CMAKE_ARGS= -DCMAKE_SYSTEM_NAME=WASI \ + -DCMAKE_SYSTEM_VERSION=1 \ + -DCMAKE_SYSTEM_PROCESSOR=wasm32 \ + -DCMAKE_AR=${LOCALBASE}/bin/llvm-ar${LLVM_VERSION} \ -DCMAKE_RANLIB=${LOCALBASE}/bin/llvm-ranlib${LLVM_VERSION} \ -DCMAKE_C_COMPILER_TARGET=${TRIPLE} \ -DCMAKE_CXX_COMPILER_TARGET=${TRIPLE} \ + -DCMAKE_ASM_COMPILER_TARGET=${TRIPLE} \ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \ - -DCMAKE_SYSROOT=${WASI_SYSROOT} \ -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_SYSROOT=${WASI_SYSROOT} \ -DCOMPILER_RT_BAREMETAL_BUILD=ON \ + -DCOMPILER_RT_BUILD_XRAY=OFF \ -DCOMPILER_RT_INCLUDE_TESTS=OFF \ - -DCOMPILER_RT_HAS_FPIC_FLAG=ON \ + -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \ + -DCOMPILER_RT_ENABLE_IOS=OFF \ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ -DCOMPILER_RT_OS_DIR=wasi - -CMAKE_ARGS+= -DLLVM_CMAKE_DIR=${LLVM_PREFIX} CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX}/lib/clang/${LLVM_VERSION} + PLIST_FILES= ${LLVM_PREFIX}/lib/clang/${LLVM_VERSION}/lib/wasi/libclang_rt.builtins-wasm32.a .include diff --git a/devel/wasi-compiler-rt17/Makefile b/devel/wasi-compiler-rt17/Makefile index caae24542522..5c7882c84831 100644 --- a/devel/wasi-compiler-rt17/Makefile +++ b/devel/wasi-compiler-rt17/Makefile @@ -1,6 +1,6 @@ # must sync with devel/llvm17 DISTVERSION= 17.0.6 -PORTREVISION= 1 +PORTREVISION= 2 MASTERDIR= ${.CURDIR}/../wasi-compiler-rt diff --git a/devel/wasi-compiler-rt18/Makefile b/devel/wasi-compiler-rt18/Makefile index e56592852dfc..5d51ffdf1b5b 100644 --- a/devel/wasi-compiler-rt18/Makefile +++ b/devel/wasi-compiler-rt18/Makefile @@ -1,5 +1,6 @@ # must sync with devel/llvm18 DISTVERSION= 18.1.8 +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../wasi-compiler-rt diff --git a/devel/wasi-libc/Makefile b/devel/wasi-libc/Makefile index 4121d70b7eb4..6b55843fd271 100644 --- a/devel/wasi-libc/Makefile +++ b/devel/wasi-libc/Makefile @@ -1,8 +1,9 @@ PORTNAME= wasi-libc DISTVERSIONPREFIX= wasi-sdk- -DISTVERSION= 21 -PORTREVISION= 1 +DISTVERSION= 22-27 +DISTVERSIONSUFFIX= -g98897e2 CATEGORIES= devel +PKGNAMESUFFIX= ${FLAVOR} MAINTAINER= vishwin@FreeBSD.org COMMENT= C standard library for WebAssembly System Interface @@ -16,11 +17,15 @@ LICENSE_FILE_LLVM2= ${WRKSRC}/LICENSE-APACHE-LLVM LICENSE_NAME_LLVM2= Apache License 2.0 with LLVM Exceptions LICENSE_PERMS_LLVM2= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -USES= gmake llvm:min=17 +FLAVORS= 18 19 17 + +USES= gmake llvm:${FLAVOR} USE_GITHUB= yes GH_ACCOUNT= WebAssembly GH_TUPLE= WebAssembly:WASI:59cbe14:wasi/tools/wasi-headers/WASI NO_ARCH= yes +PLIST= ${PKGDIR}/pkg-plist${LLVM_VERSION} +CONFLICTS_INSTALL= wasi-libc[0-9]* ALL_TARGET= finish @@ -41,7 +46,7 @@ post-install: # NOTE: our llvm ports don't ship stdarg/stddef clang headers, so # they are copied from clang/lib/Headers into FILESDIR and we install # them to the sysroot - ${INSTALL_DATA} ${FILESDIR}/*stdarg*.h ${STAGEDIR}${WASI_SYSROOT}/include/ - ${INSTALL_DATA} ${FILESDIR}/*stddef*.h ${STAGEDIR}${WASI_SYSROOT}/include/ + ${INSTALL_DATA} ${FILESDIR}/llvm${LLVM_VERSION}/*stdarg*.h ${STAGEDIR}${WASI_SYSROOT}/include/ + ${INSTALL_DATA} ${FILESDIR}/llvm${LLVM_VERSION}/*stddef*.h ${STAGEDIR}${WASI_SYSROOT}/include/ .include diff --git a/devel/wasi-libc/distinfo b/devel/wasi-libc/distinfo index 123bd995cc9d..dbc1032fc1ce 100644 --- a/devel/wasi-libc/distinfo +++ b/devel/wasi-libc/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1704903461 -SHA256 (WebAssembly-wasi-libc-wasi-sdk-21_GH0.tar.gz) = 4a2a3e3b120ba1163c57f34ac79c3de720a8355ee3a753d81f1f0c58c4cf6017 -SIZE (WebAssembly-wasi-libc-wasi-sdk-21_GH0.tar.gz) = 1313865 +TIMESTAMP = 1729202659 +SHA256 (WebAssembly-wasi-libc-wasi-sdk-22-27-g98897e2_GH0.tar.gz) = 0c393cbc7c14d9c2dfe53b850aff91d808e7d409d36cc28fc33b469bc45a145f +SIZE (WebAssembly-wasi-libc-wasi-sdk-22-27-g98897e2_GH0.tar.gz) = 1433626 SHA256 (WebAssembly-WASI-59cbe14_GH0.tar.gz) = 4e36c4add2421b44ccdded83d442d9aadf02ffa8b534d94016fad2bb7b781cc6 SIZE (WebAssembly-WASI-59cbe14_GH0.tar.gz) = 162059 diff --git a/devel/wasi-libc/files/llvm17/__stddef_max_align_t.h b/devel/wasi-libc/files/llvm17/__stddef_max_align_t.h new file mode 100644 index 000000000000..e3b439285d0f --- /dev/null +++ b/devel/wasi-libc/files/llvm17/__stddef_max_align_t.h @@ -0,0 +1,27 @@ +/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_MAX_ALIGN_T_DEFINED +#define __CLANG_MAX_ALIGN_T_DEFINED + +#if defined(_MSC_VER) +typedef double max_align_t; +#elif defined(__APPLE__) +typedef long double max_align_t; +#else +// Define 'max_align_t' to match the GCC definition. +typedef struct { + long long __clang_max_align_nonce1 + __attribute__((__aligned__(__alignof__(long long)))); + long double __clang_max_align_nonce2 + __attribute__((__aligned__(__alignof__(long double)))); +} max_align_t; +#endif + +#endif diff --git a/devel/wasi-libc/files/llvm17/stdarg.h b/devel/wasi-libc/files/llvm17/stdarg.h new file mode 100644 index 000000000000..ba978721f1f3 --- /dev/null +++ b/devel/wasi-libc/files/llvm17/stdarg.h @@ -0,0 +1,51 @@ +/*===---- stdarg.h - Variable argument handling ----------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __STDARG_H + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif + +#ifdef __need___va_list +#undef __need___va_list +#else +#define __STDARG_H +#ifndef _VA_LIST +typedef __builtin_va_list va_list; +#define _VA_LIST +#endif + +/* FIXME: This is using the placeholder dates Clang produces for these macros + in C2x mode; switch to the correct values once they've been published. */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L +/* C2x does not require the second parameter for va_start. */ +#define va_start(ap, ...) __builtin_va_start(ap, 0) +#else +/* Versions before C2x do require the second parameter. */ +#define va_start(ap, param) __builtin_va_start(ap, param) +#endif +#define va_end(ap) __builtin_va_end(ap) +#define va_arg(ap, type) __builtin_va_arg(ap, type) + +/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode + * or -ansi is not specified, since it was not part of C90. + */ +#define __va_copy(d,s) __builtin_va_copy(d,s) + +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(__cplusplus) && __cplusplus >= 201103L) || \ + !defined(__STRICT_ANSI__) +#define va_copy(dest, src) __builtin_va_copy(dest, src) +#endif + +#endif /* __STDARG_H */ + +#endif /* not __STDARG_H */ diff --git a/devel/wasi-libc/files/llvm17/stddef.h b/devel/wasi-libc/files/llvm17/stddef.h new file mode 100644 index 000000000000..539541f0ed41 --- /dev/null +++ b/devel/wasi-libc/files/llvm17/stddef.h @@ -0,0 +1,133 @@ +/*===---- stddef.h - Basic type definitions --------------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ + defined(__need_size_t) || defined(__need_wchar_t) || \ + defined(__need_NULL) || defined(__need_wint_t) + +#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ + !defined(__need_wchar_t) && !defined(__need_NULL) && \ + !defined(__need_wint_t) +/* Always define miscellaneous pieces when modules are available. */ +#if !__has_feature(modules) +#define __STDDEF_H +#endif +#define __need_ptrdiff_t +#define __need_size_t +#define __need_wchar_t +#define __need_NULL +#define __need_STDDEF_H_misc +/* __need_wint_t is intentionally not defined here. */ +#endif + +#if defined(__need_ptrdiff_t) +#if !defined(_PTRDIFF_T) || __has_feature(modules) +/* Always define ptrdiff_t when modules are available. */ +#if !__has_feature(modules) +#define _PTRDIFF_T +#endif +typedef __PTRDIFF_TYPE__ ptrdiff_t; +#endif +#undef __need_ptrdiff_t +#endif /* defined(__need_ptrdiff_t) */ + +#if defined(__need_size_t) +#if !defined(_SIZE_T) || __has_feature(modules) +/* Always define size_t when modules are available. */ +#if !__has_feature(modules) +#define _SIZE_T +#endif +typedef __SIZE_TYPE__ size_t; +#endif +#undef __need_size_t +#endif /*defined(__need_size_t) */ + +#if defined(__need_STDDEF_H_misc) +/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is + * enabled. */ +#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ + !defined(_RSIZE_T)) || __has_feature(modules) +/* Always define rsize_t when modules are available. */ +#if !__has_feature(modules) +#define _RSIZE_T +#endif +typedef __SIZE_TYPE__ rsize_t; +#endif +#endif /* defined(__need_STDDEF_H_misc) */ + +#if defined(__need_wchar_t) +#if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED) +/* Always define wchar_t when modules are available. */ +#if !defined(_WCHAR_T) || __has_feature(modules) +#if !__has_feature(modules) +#define _WCHAR_T +#if defined(_MSC_EXTENSIONS) +#define _WCHAR_T_DEFINED +#endif +#endif +typedef __WCHAR_TYPE__ wchar_t; +#endif +#endif +#undef __need_wchar_t +#endif /* defined(__need_wchar_t) */ + +#if defined(__need_NULL) +#undef NULL +#ifdef __cplusplus +# if !defined(__MINGW32__) && !defined(_MSC_VER) +# define NULL __null +# else +# define NULL 0 +# endif +#else +# define NULL ((void*)0) +#endif +#ifdef __cplusplus +#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) +namespace std { typedef decltype(nullptr) nullptr_t; } +using ::std::nullptr_t; +#endif +#endif +#undef __need_NULL +#endif /* defined(__need_NULL) */ + +/* FIXME: This is using the placeholder dates Clang produces for these macros + in C2x mode; switch to the correct values once they've been published. */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L +typedef typeof(nullptr) nullptr_t; +#endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L */ + +#if defined(__need_STDDEF_H_misc) && defined(__STDC_VERSION__) && \ + __STDC_VERSION__ >= 202000L +#define unreachable() __builtin_unreachable() +#endif /* defined(__need_STDDEF_H_misc) && >= C23 */ + +#if defined(__need_STDDEF_H_misc) +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ + (defined(__cplusplus) && __cplusplus >= 201103L) +#include "__stddef_max_align_t.h" +#endif +#define offsetof(t, d) __builtin_offsetof(t, d) +#undef __need_STDDEF_H_misc +#endif /* defined(__need_STDDEF_H_misc) */ + +/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use +__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ +#if defined(__need_wint_t) +/* Always define wint_t when modules are available. */ +#if !defined(_WINT_T) || __has_feature(modules) +#if !__has_feature(modules) +#define _WINT_T +#endif +typedef __WINT_TYPE__ wint_t; +#endif +#undef __need_wint_t +#endif /* __need_wint_t */ + +#endif diff --git a/devel/wasi-libc/files/__stdarg___gnuc_va_list.h b/devel/wasi-libc/files/llvm18/__stdarg___gnuc_va_list.h similarity index 100% rename from devel/wasi-libc/files/__stdarg___gnuc_va_list.h rename to devel/wasi-libc/files/llvm18/__stdarg___gnuc_va_list.h diff --git a/devel/wasi-libc/files/__stdarg___va_copy.h b/devel/wasi-libc/files/llvm18/__stdarg___va_copy.h similarity index 100% rename from devel/wasi-libc/files/__stdarg___va_copy.h rename to devel/wasi-libc/files/llvm18/__stdarg___va_copy.h diff --git a/devel/wasi-libc/files/__stdarg_va_arg.h b/devel/wasi-libc/files/llvm18/__stdarg_va_arg.h similarity index 100% rename from devel/wasi-libc/files/__stdarg_va_arg.h rename to devel/wasi-libc/files/llvm18/__stdarg_va_arg.h diff --git a/devel/wasi-libc/files/__stdarg_va_copy.h b/devel/wasi-libc/files/llvm18/__stdarg_va_copy.h similarity index 100% rename from devel/wasi-libc/files/__stdarg_va_copy.h rename to devel/wasi-libc/files/llvm18/__stdarg_va_copy.h diff --git a/devel/wasi-libc/files/__stdarg_va_list.h b/devel/wasi-libc/files/llvm18/__stdarg_va_list.h similarity index 100% rename from devel/wasi-libc/files/__stdarg_va_list.h rename to devel/wasi-libc/files/llvm18/__stdarg_va_list.h diff --git a/devel/wasi-libc/files/__stddef_max_align_t.h b/devel/wasi-libc/files/llvm18/__stddef_max_align_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_max_align_t.h rename to devel/wasi-libc/files/llvm18/__stddef_max_align_t.h diff --git a/devel/wasi-libc/files/__stddef_null.h b/devel/wasi-libc/files/llvm18/__stddef_null.h similarity index 100% rename from devel/wasi-libc/files/__stddef_null.h rename to devel/wasi-libc/files/llvm18/__stddef_null.h diff --git a/devel/wasi-libc/files/__stddef_nullptr_t.h b/devel/wasi-libc/files/llvm18/__stddef_nullptr_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_nullptr_t.h rename to devel/wasi-libc/files/llvm18/__stddef_nullptr_t.h diff --git a/devel/wasi-libc/files/__stddef_offsetof.h b/devel/wasi-libc/files/llvm18/__stddef_offsetof.h similarity index 100% rename from devel/wasi-libc/files/__stddef_offsetof.h rename to devel/wasi-libc/files/llvm18/__stddef_offsetof.h diff --git a/devel/wasi-libc/files/__stddef_ptrdiff_t.h b/devel/wasi-libc/files/llvm18/__stddef_ptrdiff_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_ptrdiff_t.h rename to devel/wasi-libc/files/llvm18/__stddef_ptrdiff_t.h diff --git a/devel/wasi-libc/files/__stddef_rsize_t.h b/devel/wasi-libc/files/llvm18/__stddef_rsize_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_rsize_t.h rename to devel/wasi-libc/files/llvm18/__stddef_rsize_t.h diff --git a/devel/wasi-libc/files/__stddef_size_t.h b/devel/wasi-libc/files/llvm18/__stddef_size_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_size_t.h rename to devel/wasi-libc/files/llvm18/__stddef_size_t.h diff --git a/devel/wasi-libc/files/__stddef_unreachable.h b/devel/wasi-libc/files/llvm18/__stddef_unreachable.h similarity index 96% rename from devel/wasi-libc/files/__stddef_unreachable.h rename to devel/wasi-libc/files/llvm18/__stddef_unreachable.h index 518580c92d3f..61df43e9732f 100644 --- a/devel/wasi-libc/files/__stddef_unreachable.h +++ b/devel/wasi-libc/files/llvm18/__stddef_unreachable.h @@ -7,6 +7,8 @@ *===-----------------------------------------------------------------------=== */ +#ifndef __cplusplus + /* * When -fbuiltin-headers-in-system-modules is set this is a non-modular header * and needs to behave as if it was textual. @@ -15,3 +17,5 @@ (__has_feature(modules) && !__building_module(_Builtin_stddef)) #define unreachable() __builtin_unreachable() #endif + +#endif diff --git a/devel/wasi-libc/files/__stddef_wchar_t.h b/devel/wasi-libc/files/llvm18/__stddef_wchar_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_wchar_t.h rename to devel/wasi-libc/files/llvm18/__stddef_wchar_t.h diff --git a/devel/wasi-libc/files/__stddef_wint_t.h b/devel/wasi-libc/files/llvm18/__stddef_wint_t.h similarity index 100% rename from devel/wasi-libc/files/__stddef_wint_t.h rename to devel/wasi-libc/files/llvm18/__stddef_wint_t.h diff --git a/devel/wasi-libc/files/stdarg.h b/devel/wasi-libc/files/llvm18/stdarg.h similarity index 100% rename from devel/wasi-libc/files/stdarg.h rename to devel/wasi-libc/files/llvm18/stdarg.h diff --git a/devel/wasi-libc/files/stddef.h b/devel/wasi-libc/files/llvm18/stddef.h similarity index 100% rename from devel/wasi-libc/files/stddef.h rename to devel/wasi-libc/files/llvm18/stddef.h diff --git a/devel/wasi-libc/files/llvm19/__stdarg___gnuc_va_list.h b/devel/wasi-libc/files/llvm19/__stdarg___gnuc_va_list.h new file mode 100644 index 000000000000..2a0a7e8cc6c0 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stdarg___gnuc_va_list.h @@ -0,0 +1,13 @@ +/*===---- __stdarg___gnuc_va_list.h - Definition of __gnuc_va_list ---------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif diff --git a/devel/wasi-libc/files/llvm19/__stdarg___va_copy.h b/devel/wasi-libc/files/llvm19/__stdarg___va_copy.h new file mode 100644 index 000000000000..e433e18a7082 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stdarg___va_copy.h @@ -0,0 +1,12 @@ +/*===---- __stdarg___va_copy.h - Definition of __va_copy -------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __va_copy +#define __va_copy(d, s) __builtin_va_copy(d, s) +#endif diff --git a/devel/wasi-libc/files/llvm19/__stdarg_header_macro.h b/devel/wasi-libc/files/llvm19/__stdarg_header_macro.h new file mode 100644 index 000000000000..beb92ee02526 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stdarg_header_macro.h @@ -0,0 +1,12 @@ +/*===---- __stdarg_header_macro.h ------------------------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __STDARG_H +#define __STDARG_H +#endif diff --git a/devel/wasi-libc/files/llvm19/__stdarg_va_arg.h b/devel/wasi-libc/files/llvm19/__stdarg_va_arg.h new file mode 100644 index 000000000000..89bd2f65d3be --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stdarg_va_arg.h @@ -0,0 +1,22 @@ +/*===---- __stdarg_va_arg.h - Definitions of va_start, va_arg, va_end-------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef va_arg + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L +/* C23 does not require the second parameter for va_start. */ +#define va_start(ap, ...) __builtin_va_start(ap, 0) +#else +/* Versions before C23 do require the second parameter. */ +#define va_start(ap, param) __builtin_va_start(ap, param) +#endif +#define va_end(ap) __builtin_va_end(ap) +#define va_arg(ap, type) __builtin_va_arg(ap, type) + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stdarg_va_copy.h b/devel/wasi-libc/files/llvm19/__stdarg_va_copy.h new file mode 100644 index 000000000000..8645328c2c68 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stdarg_va_copy.h @@ -0,0 +1,12 @@ +/*===---- __stdarg_va_copy.h - Definition of va_copy------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef va_copy +#define va_copy(dest, src) __builtin_va_copy(dest, src) +#endif diff --git a/devel/wasi-libc/files/llvm19/__stdarg_va_list.h b/devel/wasi-libc/files/llvm19/__stdarg_va_list.h new file mode 100644 index 000000000000..20c2e2cad940 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stdarg_va_list.h @@ -0,0 +1,13 @@ +/*===---- __stdarg_va_list.h - Definition of va_list -----------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef _VA_LIST +#define _VA_LIST +typedef __builtin_va_list va_list; +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_header_macro.h b/devel/wasi-libc/files/llvm19/__stddef_header_macro.h new file mode 100644 index 000000000000..db5fb3c0abc1 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_header_macro.h @@ -0,0 +1,12 @@ +/*===---- __stddef_header_macro.h ------------------------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __STDDEF_H +#define __STDDEF_H +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_max_align_t.h b/devel/wasi-libc/files/llvm19/__stddef_max_align_t.h new file mode 100644 index 000000000000..512606a87728 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_max_align_t.h @@ -0,0 +1,27 @@ +/*===---- __stddef_max_align_t.h - Definition of max_align_t ---------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_MAX_ALIGN_T_DEFINED +#define __CLANG_MAX_ALIGN_T_DEFINED + +#if defined(_MSC_VER) +typedef double max_align_t; +#elif defined(__APPLE__) +typedef long double max_align_t; +#else +// Define 'max_align_t' to match the GCC definition. +typedef struct { + long long __clang_max_align_nonce1 + __attribute__((__aligned__(__alignof__(long long)))); + long double __clang_max_align_nonce2 + __attribute__((__aligned__(__alignof__(long double)))); +} max_align_t; +#endif + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_null.h b/devel/wasi-libc/files/llvm19/__stddef_null.h new file mode 100644 index 000000000000..c10bd2d7d988 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_null.h @@ -0,0 +1,29 @@ +/*===---- __stddef_null.h - Definition of NULL -----------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#if !defined(NULL) || !__building_module(_Builtin_stddef) + +/* linux/stddef.h will define NULL to 0. glibc (and other) headers then define + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern + * in the non-modules case. + */ +#undef NULL + +#ifdef __cplusplus +#if !defined(__MINGW32__) && !defined(_MSC_VER) +#define NULL __null +#else +#define NULL 0 +#endif +#else +#define NULL ((void*)0) +#endif + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_nullptr_t.h b/devel/wasi-libc/files/llvm19/__stddef_nullptr_t.h new file mode 100644 index 000000000000..7f3fbe6fe0d3 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_nullptr_t.h @@ -0,0 +1,29 @@ +/*===---- __stddef_nullptr_t.h - Definition of nullptr_t -------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(_NULLPTR_T) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define _NULLPTR_T + +#ifdef __cplusplus +#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; +#endif +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L +typedef typeof(nullptr) nullptr_t; +#endif + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_offsetof.h b/devel/wasi-libc/files/llvm19/__stddef_offsetof.h new file mode 100644 index 000000000000..84172c6cd273 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_offsetof.h @@ -0,0 +1,17 @@ +/*===---- __stddef_offsetof.h - Definition of offsetof ---------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define offsetof(t, d) __builtin_offsetof(t, d) +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_ptrdiff_t.h b/devel/wasi-libc/files/llvm19/__stddef_ptrdiff_t.h new file mode 100644 index 000000000000..fd3c893c66c9 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_ptrdiff_t.h @@ -0,0 +1,20 @@ +/*===---- __stddef_ptrdiff_t.h - Definition of ptrdiff_t -------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(_PTRDIFF_T) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define _PTRDIFF_T + +typedef __PTRDIFF_TYPE__ ptrdiff_t; + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_rsize_t.h b/devel/wasi-libc/files/llvm19/__stddef_rsize_t.h new file mode 100644 index 000000000000..dd433d40d973 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_rsize_t.h @@ -0,0 +1,20 @@ +/*===---- __stddef_rsize_t.h - Definition of rsize_t -----------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(_RSIZE_T) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define _RSIZE_T + +typedef __SIZE_TYPE__ rsize_t; + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_size_t.h b/devel/wasi-libc/files/llvm19/__stddef_size_t.h new file mode 100644 index 000000000000..3dd7b1f37929 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_size_t.h @@ -0,0 +1,20 @@ +/*===---- __stddef_size_t.h - Definition of size_t -------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(_SIZE_T) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define _SIZE_T + +typedef __SIZE_TYPE__ size_t; + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_unreachable.h b/devel/wasi-libc/files/llvm19/__stddef_unreachable.h new file mode 100644 index 000000000000..61df43e9732f --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_unreachable.h @@ -0,0 +1,21 @@ +/*===---- __stddef_unreachable.h - Definition of unreachable ---------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __cplusplus + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(unreachable) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define unreachable() __builtin_unreachable() +#endif + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_wchar_t.h b/devel/wasi-libc/files/llvm19/__stddef_wchar_t.h new file mode 100644 index 000000000000..bd69f6322541 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_wchar_t.h @@ -0,0 +1,28 @@ +/*===---- __stddef_wchar.h - Definition of wchar_t -------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#if !defined(__cplusplus) || (defined(_MSC_VER) && !_NATIVE_WCHAR_T_DEFINED) + +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(_WCHAR_T) || \ + (__has_feature(modules) && !__building_module(_Builtin_stddef)) +#define _WCHAR_T + +#ifdef _MSC_EXTENSIONS +#define _WCHAR_T_DEFINED +#endif + +typedef __WCHAR_TYPE__ wchar_t; + +#endif + +#endif diff --git a/devel/wasi-libc/files/llvm19/__stddef_wint_t.h b/devel/wasi-libc/files/llvm19/__stddef_wint_t.h new file mode 100644 index 000000000000..0aa291507957 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/__stddef_wint_t.h @@ -0,0 +1,15 @@ +/*===---- __stddef_wint.h - Definition of wint_t ---------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef _WINT_T +#define _WINT_T + +typedef __WINT_TYPE__ wint_t; + +#endif diff --git a/devel/wasi-libc/files/llvm19/stdarg.h b/devel/wasi-libc/files/llvm19/stdarg.h new file mode 100644 index 000000000000..6203d7a600a2 --- /dev/null +++ b/devel/wasi-libc/files/llvm19/stdarg.h @@ -0,0 +1,75 @@ +/*===---- stdarg.h - Variable argument handling ----------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * This header is designed to be included multiple times. If any of the __need_ + * macros are defined, then only that subset of interfaces are provided. This + * can be useful for POSIX headers that need to not expose all of stdarg.h, but *** 1362 LINES SKIPPED ***