PORTNAME= libcxx DISTVERSION= 13.0.1 CATEGORIES= devel lang MASTER_SITES= https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \ https://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR} PKGNAMEPREFIX= wasi- DISTNAME= llvm-project-${DISTVERSION}.src DISTFILES= llvm-project-${DISTVERSION}.src${EXTRACT_SUFX} MAINTAINER= greg@unrelenting.technology COMMENT= C++ standard library for WebAssembly System Interface LICENSE= LLVM2 LICENSE_NAME= Apache License 2.0 with LLVM Exceptions LICENSE_FILE= ${WRKSRC}/LICENSE.TXT LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BUILD_DEPENDS= ${WASI_SYSROOT}/include/stdarg.h:devel/wasi-libc \ clang${LLVM_SUFFIX}:devel/llvm${LLVM_SUFFIX} USES= cmake tar:xz NO_ARCH= yes SSP_UNSAFE= yes CC= ${LOCALBASE}/bin/clang${LLVM_SUFFIX} CXX= ${LOCALBASE}/bin/clang++${LLVM_SUFFIX} LLVM_RELEASE= ${DISTVERSION:C/rc.*//} LLVM_SUFFIX= ${LLVM_RELEASE:C/\.[0-9]\.[0-9]$//} LLVM_PREFIX= ${PREFIX}/llvm${LLVM_SUFFIX} WASI_SYSROOT= ${LOCALBASE}/share/wasi-sysroot WRKSRC= ${WRKDIR}/${DISTNAME}/libcxx CONFIGURE_ENV+= CC="${CC}" CFLAGS="${CFLAGS}" CONFIGURE_ENV+= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" CMAKE_INSTALL_PREFIX= ${PREFIX}/share/wasi-sysroot CMAKE_ARGS= -DCMAKE_C_COMPILER_WORKS=1 \ -DCMAKE_CXX_COMPILER_WORKS=1 \ -DCXX_SUPPORTS_CXX11=ON \ -DLLVM_COMPILER_CHECKED=ON \ -DUNIX:BOOL=ON \ -DCMAKE_SYSROOT=${WASI_SYSROOT} \ -DCMAKE_CXX_COMPILER_TARGET=wasm32-wasi \ -DLLVM_CONFIG_PATH=${LOCALBASE}/bin/llvm-config${LLVM_SUFFIX} \ -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi \ -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=FALSE \ -DLIBCXX_INCLUDE_TESTS:BOOL=FALSE \ -DLIBCXX_ENABLE_THREADS:BOOL=OFF \ -DLIBCXX_HAS_PTHREAD_API:BOOL=OFF \ -DLIBCXX_HAS_EXTERNAL_THREAD_API:BOOL=OFF \ -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF \ -DLIBCXX_HAS_WIN32_THREAD_API:BOOL=OFF \ -DLIBCXX_ENABLE_SHARED:BOOL=OFF \ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY:BOOL=OFF \ -DLIBCXX_ENABLE_EXCEPTIONS:BOOL=OFF \ -DLIBCXX_ENABLE_FILESYSTEM:BOOL=OFF \ -DLIBCXX_CXX_ABI=libcxxabi \ -DLIBCXX_HAS_MUSL_LIBC:BOOL=ON \ -DLIBCXX_ABI_VERSION=2 \ -DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi \ -DLIBCXXABI_ENABLE_EXCEPTIONS:BOOL=OFF \ -DLIBCXXABI_ENABLE_SHARED:BOOL=OFF \ -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \ -DLIBCXXABI_ENABLE_THREADS:BOOL=OFF \ -DLIBCXXABI_HAS_PTHREAD_API:BOOL=OFF \ -DLIBCXXABI_HAS_EXTERNAL_THREAD_API:BOOL=OFF \ -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF \ -DLIBCXXABI_HAS_WIN32_THREAD_API:BOOL=OFF \ -DLIBCXXABI_LIBCXX_INCLUDES=${CONFIGURE_WRKSRC}/include/c++/v1 \ -DLIBCXX_SUPPORTS_FNO_EXCEPTIONS_FLAG:BOOL=ON \ -DLIBCXX_SUPPORTS_NOSTDLIBXX_FLAG:BOOL=ON \ -DLIBCXX_SU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\ -DLIBCXXABI_SUPPORTS_FNO_EXCEPTIONS_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_NOSTDLIBXX_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_NODEFAULTLIBS_FLAG:BOOL=ON \ -DLIBCXXABI_HAS_COMMENT_LIB_PRAGMA:BOOL=ON \ -DLIBCXXABI_SUPPORTS_FALIGNED_ALLOCATION_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_NOSTDINCXX_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_FVISIBILITY_EQ_HIDDEN_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WALL_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WEXTRA_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_W_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WWRITE_STRINGS_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_UNUSED_PARAMETER_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_LONG_LONG_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WERROR_EQ_RETURN_TYPE_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WEXTRA_SEMI_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WUNDEF_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_USER_DEFINED_LITERALS_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_COVERED_SWITCH_DEFAULT_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_SUGGEST_OVERRIDE_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_IGNORED_ATTRIBUTES_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNO_ERROR_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_EHS_FLAG:BOOL=OFF \ -DLIBCXXABI_SUPPORTS_EHA_FLAG:BOOL=OFF \ -DLIBCXXABI_SUPPORTS_ZL_FLAG:BOOL=OFF \ -DLIBCXXABI_SUPPORTS_NODEFAULTLIB_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WCHAR_SUBSCRIPTS_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WCONVERSION_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WMISMATCHED_TAGS_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WMISSING_BRACES_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WNEWLINE_EOF_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WUNUSED_FUNCTION_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WSHADOW_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WSHORTEN_64_TO_32_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WSIGN_COMPARE_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WSIGN_CONVERSION_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WSTRICT_ALIASING_EQ_2_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WSTRICT_OVERFLOW_EQ_4_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WUNUSED_PARAMETER_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WUNUSED_VARIABLE_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_WX_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_PEDANTIC_FLAG:BOOL=ON \ -DLIBCXXABI_SUPPORTS_FSTRICT_ALIASING_FLAG:BOOL=ON post-extract: @${MKDIR} ${WRKDIR}/.build_cxxabi post-configure: @cd ${WRKDIR}/.build_cxxabi && \ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${WRKDIR}/${DISTNAME}/libcxxabi post-build: @${LOCALBASE}/bin/llvm-ranlib${LLVM_SUFFIX} ${CONFIGURE_WRKSRC}/lib/wasm32-wasi/*.a @cd ${WRKDIR}/.build_cxxabi && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} @${LOCALBASE}/bin/llvm-ranlib${LLVM_SUFFIX} ${WRKDIR}/.build_cxxabi/lib/wasm32-wasi/*.a post-install: @cd ${WRKDIR}/.build_cxxabi && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${INSTALL_TARGET} .include