python/hypothesis: update to 6.122.3
[oi-userland.git] / components / developer / clang-19 / Makefile
blobbd36d0c92c0be8b109a9f4da2eba6d468f4e6327
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Aurelien Larcher. All rights reserved.
14 # Copyright 2019 Alexander Pyhalov
15 # Copyright 2019 Michal Nowak
16 # Copyright 2019 Till Wegmüller
17 # Copyright 2022 Klaus Ziegler
18 # Copyright 2024 Friedrich Kink
21 BUILD_STYLE= cmake
22 USE_PARALLEL_BUILD= yes
23 include ../../../make-rules/shared-macros.mk
25 COMPONENT_NAME= clang
26 COMPONENT_VERSION= 19.1.5
27 CLANG_VERSION= $(firstword $(subst ., ,$(COMPONENT_VERSION)))
28 COMPONENT_SUMMARY= LLVM tools and Clang compiler
29 COMPONENT_PROJECT_URL= https://llvm.org/
30 COMPONENT_SRC= $(LLVM_NAME)-$(COMPONENT_VERSION).src
31 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
32 COMPONENT_ARCHIVE_HASH= sha256:7d71635948e4da1814ce8e15ec45399e4094a5442e86d352c96ded0f2b3171b6
33 COMPONENT_ARCHIVE_URL= https://github.com/llvm/llvm-project/releases/download/llvmorg-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
34 COMPONENT_FMRI= $(CLANG_DEVELOPER_PKG)
35 COMPONENT_CLASSIFICATION= Development/C
36 COMPONENT_LICENSE= BSD
37 COMPONENT_LICENSE_FILE= LICENSE.TXT
39 COMPONENT_FMRI.clang-runtime = $(CLANG_RUNTIME_PKG)
41 LLVM_NAME= llvm
42 CLANG_NAME= clang
44 COMPONENT_ARCHIVE_1= $(CLANG_NAME)-$(COMPONENT_VERSION).src.tar.xz
45 COMPONENT_ARCHIVE_HASH_1= sha256:e7dfc8050407b5cc564c1c1afe19517255c9229cccd886dbd5bac9b652828d85
46 COMPONENT_ARCHIVE_URL_1=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_1)
48 COMPONENT_ARCHIVE_2= cmake-$(COMPONENT_VERSION).src.tar.xz
49 COMPONENT_ARCHIVE_HASH_2= sha256:a08ae477571fd5e929c27d3d0d28c6168d58dd00b6354c2de3266ae0d86ad44f
50 COMPONENT_ARCHIVE_URL_2=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_2)
52 COMPONENT_ARCHIVE_3= third-party-$(COMPONENT_VERSION).src.tar.xz
53 COMPONENT_ARCHIVE_HASH_3= sha256:22b352c35b034a4ab3f2b852b6a2602a4da8971abe459080450d9e3462550d1d
54 COMPONENT_ARCHIVE_URL_3=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_3)
56 include $(WS_MAKE_RULES)/common.mk
58 CMAKE_PREFIX = $(CLANG_PREFIX)
60 COMPONENT_POST_UNPACK_ACTION += \
61 $(UNPACK) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_1) && \
62 $(MV) $(CLANG_NAME)-$(COMPONENT_VERSION).src $(COMPONENT_SRC)/tools/clang && \
63 $(UNPACK) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_2) && \
64 $(MV) cmake-$(COMPONENT_VERSION).src/Modules $(COMPONENT_SRC)/cmake/ && \
65 $(RM) -r cmake-$(COMPONENT_VERSION).src && \
66 $(UNPACK) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_3) && \
67 $(MKDIR) $(COMPONENT_SRC)/third-party && \
68 $(MV) third-party-$(COMPONENT_VERSION).src/unittest $(COMPONENT_SRC)/third-party && \
69 $(MV) third-party-$(COMPONENT_VERSION).src/benchmark $(COMPONENT_SRC)/third-party && \
70 $(RM) -r third-party-$(COMPONENT_VERSION).src
72 COMPONENT_PRE_CONFIGURE_ACTION = ( $(CLONEY) $(SOURCE_DIR) $(@D); )
74 COMPONENT_POST_INSTALL_ACTION = \
75 for file in `echo $(PROTO_DIR)/$(CMAKE_PREFIX)/bin/*`; do \
76 /usr/bin/elfedit -e 'dyn:runpath $(GCC_LIBDIR):$(CMAKE_PREFIX)/lib' $$file ; \
77 done && \
78 for file in \
79 `ggrep -rlh '^\#!*/usr/bin/env python' $(PROTO_DIR)/$(CMAKE_PREFIX)`; do \
80 sed -i -e 's:\#!/usr/bin/env.*:\#!$(PYTHON):' $$file; \
81 done
83 CMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC)
84 CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX)
85 CMAKE_OPTIONS += -DCMAKE_CXX_LINK_FLAGS="-L$(GCC_LIBDIR) -Wl,-rpath,$(GCC_LIBDIR)"
86 CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Release
87 CMAKE_OPTIONS += -DCLANG_DEFAULT_LINKER="/usr/bin/ld"
88 CMAKE_OPTIONS += -DLLVM_ENABLE_EH=ON
89 CMAKE_OPTIONS += -DLLVM_ENABLE_RTTI=ON
90 CMAKE_OPTIONS += -DLLVM_LINK_LLVM_DYLIB=ON
91 CMAKE_OPTIONS += -DLLVM_INCLUDE_BENCHMARKS=OFF
92 CMAKE_OPTIONS += -DLLVM_INSTALL_UTILS=ON
93 CMAKE_OPTIONS += -DCLANG_DEFAULT_RTLIB=libgcc
94 CMAKE_OPTIONS += -DCLANG_DEFAULT_CXX_STDLIB=libstdc++
95 CMAKE_OPTIONS += -DPYTHON_EXECUTABLE="$(PYTHON)"
96 CMAKE_OPTIONS += -DCMAKE_MODULE_PATH="$(SOURCE_DIR)/$(COMPONENT_SRC)/cmake/Modules"
98 COMPONENT_TEST_CMD = $(GMAKE)
99 COMPONENT_TEST_ARGS = $(COMPONENT_BUILD_GMAKE_ARGS)
100 COMPONENT_TEST_TARGETS = check-all
101 COMPONENT_TEST_ENV += PATH=$(PATH.gnu)
103 # Do not change the order of these regexp transforms.
104 COMPONENT_TEST_TRANSFORMS += \
105 '-e "/^Testing Time: .*$$/d" ' \
106 '-e "/^make.*$$/d" ' \
107 '-e "/^Failed Tests /,/Unexpected Passed:/p" ' \
108 '-e "" ' \
109 '-e "/.*/d" '
111 TESTSUITE_MAKE = $(GMAKE)
113 # Auto-generated dependencies
114 PYTHON_REQUIRED_PACKAGES += runtime/python
115 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
116 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
117 REQUIRED_PACKAGES += SUNWcs
118 REQUIRED_PACKAGES += compress/zstd
119 REQUIRED_PACKAGES += library/libedit
120 REQUIRED_PACKAGES += library/libxml2
121 REQUIRED_PACKAGES += library/zlib
122 REQUIRED_PACKAGES += system/library
123 REQUIRED_PACKAGES += system/library/math