aboutsummaryrefslogtreecommitdiff
path: root/lib/clang
Commit message (Collapse)AuthorAgeFilesLines
* clang: install clang-scan-depsLexi Winter2025-07-061-0/+6
| | | | | | | | | | | | | | | | | | clang-scan-deps is used to generate dependency information from C++20 modules according to proposed standard ISO/IEC WG21 P1689R5[0]. It is required by common build tools (e.g., CMake) to build C++ sources that use modules. Since this is a core build tool, install it by default, not gated behind MK_CLANG_EXTRAS. [0] https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2022/p1689r5.html MFC after: 3 days Reviewed by: kevans, dim Approved by: kevans (mentor) Requested by: jbo Differential Revision: https://reviews.freebsd.org/D51044
* Convert libllvm, libclang and liblldb into private shared librariesDimitry Andric2025-04-253-95/+163
| | | | | | | | | | | | | | | | | | | | This allows clang, lld, lldb, and other llvm tools to be linked against these shared libraries, which makes them smaller and avoids duplication. Since these are not quite the same as the shared libraries shipped by the upstream llvm build system, and we do not want to expose the ABI to external programs such as ports, make them private libraries. Note that during the cross-tools stage they are still built as static libraries, so the cross compiler and linker are static binaries, as they have always been. This also requires a depend-cleanup.sh kludge which will be added in a follow-up commit, to ensure binaries are rebuilt against the shared libraries in case of incremental builds. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49967
* Partially revert 6527682ab705 for llvm-based projectsDimitry Andric2025-04-241-0/+1
| | | | | | | | | | Upstream llvm compiles most of their subprojects with -std=c++17 explicitly, not -std=gnu++17. In gnu++17 mode, both clang and gcc define the macro 'i386' on i386, which clashes with a namespace identifier in contrib/llvm-project/llvm/include/llvm/ExecutionEngine/JITLink/i386.h. Since the default after 6527682ab705 is now CXXSTD=gnu++17, explicitly set CXXSTD=c++17 for lib/clang, lib/libclang_rt and lib/libomp.
* libllvm: remove duplicated SRCS_MIN lineDimitry Andric2025-04-191-1/+0
| | | | | | | This is not harmful when making a static library apparently, but will result in duplicate symbol errors when making a dynamic library. MFC after: 3 days
* src: Use gnu++17 as the default C++ standardJohn Baldwin2025-04-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | Previously the compiler's default C++ standard was used unlike C where bsd.sys.mk explicitly sets a default language version. Setting an explicit default version will give a more uniform experience across different compilers and compiler versions. gnu++17 was chosen to match the default C standard. It is well supported by a wide range of clang (5+) and GCC (9+) versions. gnu++17 is also the default C++ standard in recent versions of clang (16+) and GCC (11+). As a result, many of the explicit CXXSTD settings in Makefiles had the effect of lowering the C++ standard instead of raising it as was originally intended and are removed. Note that the remaining explicit CXXSTD settings for atf and liblutok explicitly lower the standard to C++11 due to use of the deprecated auto_ptr<> template which is removed in later versions. Reviewed by: imp, asomers, dim, emaste Differential Revision: https://reviews.freebsd.org/D49223
* Merge llvm-project release/19.x llvmorg-19.1.7-0-gcd708029e0b2Dimitry Andric2025-01-167-15/+15
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.7-0-gcd708029e0b2, a.k.a. 19.1.7 release. PR: 280562 MFC after: 3 days
* Merge llvm-project release/19.x llvmorg-19.1.5-0-gab4b5a2db582Dimitry Andric2024-12-067-15/+15
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.5-0-gab4b5a2db582, a.k.a. 19.1.5 release. PR: 280562 MFC after: 3 days
* Merge llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76eDimitry Andric2024-11-217-15/+15
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.4-0-gaadaa00de76e, a.k.a. 19.1.4 release. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5Dimitry Andric2024-11-087-15/+15
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5, a.k.a. 19.1.3 release. PR: 280562 MFC after: 1 month
* Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUGDimitry Andric2024-10-241-0/+4
| | | | | | | | | | | | | | When assertions are disabled, the upstream build system disables LLVM_ENABLE_ABI_BREAKING_CHECKS by default. Though the upstream build system allows it to be force-enabled, it looks like that is not a well-tested build-time configuration. Therefore, always disable LLVM_ENABLE_ABI_BREAKING_CHECKS when assertions are disabled, which will also save some more runtime cost when people use WITHOUT_LLVM_ASSERTIONS. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6Dimitry Andric2024-10-237-15/+15
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6, a.k.a. 19.1.2 release. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349Dimitry Andric2024-10-237-15/+15
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.1-0-gd401987fe349, a.k.a. 19.1.1 release. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1Dimitry Andric2024-10-237-12/+12
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-0-ga4bf6cd7cfb1, a.k.a. 19.1.0 release. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515aDimitry Andric2024-10-238-941/+987
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8Dimitry Andric2024-10-237-12/+12
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1cDimitry Andric2024-10-237-12/+12
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c. PR: 280562 MFC after: 1 month
* Merge llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2Dimitry Andric2024-10-239-15/+21
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/19.x llvmorg-19.1.0-rc1-0-ga4902a36d5c2. PR: 280562 MFC after: 1 month
* Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0Dimitry Andric2024-10-2315-344/+3855
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the last commit before the upstream release/19.x branch was created. PR: 280562 MFC after: 1 month
* lib/clang: Commit cleaned-up workaround for building on RISC-VJessica Clarke2024-10-181-0/+8
| | | | | | | | | | | There is a long-standing issue on RISC-V around --gc-sections when statically linking, which affects the bootstrap build of LLVM. Since fixing this properly has remained a TODO for years, commit the workaround with documentation so that building natively from source works out of the box. PR: 258358 MFC after: 1 week
* dirdeps: update Makefile.depend for toolchainKa Ho Ng2024-09-241-0/+1
| | | | Sponsored by: Juniper Networks, Inc.
* Bump lld LINKER_FREEBSD_VERSION for reproducibility fixDimitry Andric2024-09-221-1/+1
| | | | | | | | The upstream fix to make lld output for our EFI loaders reproducible again was committed in 54521a2ff93a. Bump lld's LINKER_FREEBSD_VERSION to be able to check this in the EFI loader Makefile. MFC after: 3 days
* Remove residual blank line at start of MakefileWarner Losh2024-07-158-8/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Merge llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67Dimitry Andric2024-05-247-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.6-0-g1118c2e05e67. PR: 276104 MFC after: 3 days
* lib/clang: clean out old llvm/clang Sparc target remnantsDimitry Andric2024-05-045-16/+0
| | | | | | | | The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago, but some ifdefs were still laying around, so clean them up. PR: 276104 MFC after: 3 days
* Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9Dimitry Andric2024-05-047-15/+15
| | | | | | | | | Update version numbers, config headers, etc. Git tricked me into losing these before pushing. PR: 276104 Fixes: d67fc74b9249 MFC after: 3 days
* Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6Dimitry Andric2024-04-207-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6. PR: 276104 MFC after: 3 days
* libllvm: add missed tlbgen headers and sources for BPF targetDimitry Andric2024-04-101-0/+7
| | | | | | Noticed by: vishwin PR: 276104 MFC after: 1 month
* Merge llvm-project release/18.x llvmorg-18.1.3-0-gc13b7485b879Dimitry Andric2024-04-067-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.3-0-gc13b7485b879. PR: 276104 MFC after: 1 month
* Merge llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7eDimitry Andric2024-04-068-93/+99
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e. PR: 276104 MFC after: 1 month
* Merge llvm-project release/18.x llvmorg-18.1.0-rc3-0-g6c90f8dd5463Dimitry Andric2024-04-063-5/+5
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.0-rc3-0-g6c90f8dd5463. PR: 276104 MFC after: 1 month
* Merge llvm-project release/18.x llvmorg-18.1.0-rc2-53-gc7b0a6ecd442Dimitry Andric2024-04-063-5/+5
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-53-gc7b0a6ecd442. PR: 276104 MFC after: 1 month
* Merge llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967Dimitry Andric2024-04-064-6/+7
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18.1.0-rc2-0-gc6c86965d967. PR: 276104 MFC after: 1 month
* Merge llvm-project release/18.x llvmorg-18-init-18361-g22683463740eDimitry Andric2024-04-067-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project release/18.x llvmorg-18-init-18361-g22683463740e. PR: 276104 MFC after: 1 month
* Merge llvm-project main llvmorg-18-init-18359-g93248729cfaeDimitry Andric2024-04-066-9/+17
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the last commit before the upstream release/18.x branch was created. PR: 276104 MFC after: 1 month
* Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424Dimitry Andric2024-04-064-21/+21
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424. PR: 276104 MFC after: 1 month
* Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cdeDimitry Andric2024-04-064-8/+9
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde. PR: 276104 MFC after: 1 month
* Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4Dimitry Andric2024-04-0611-5/+122
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4. PR: 276104 MFC after: 1 month
* Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6aDimitry Andric2024-04-068-26/+60
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a. PR: 276104 MFC after: 1 month
* Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fbDimitry Andric2024-04-0613-294/+1560
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb. PR: 276104 MFC after: 1 month
* Optionally create full debuginfo for llvm-related executablesDimitry Andric2024-02-167-3/+9
| | | | | | | | | | | | | | | | Commit de6feefdb7cfd limited the amount of debuginfo generated for clang and other llvm-related executables. This was done to save disk space and memory during building, but it makes debugging any of these executables much harder. Add a new src.conf(5) setting, WITH_LLVM_FULL_DEBUGINFO, to generate full debuginfo instead. This is off by default, but could for example be enabled for release builds or snapshots, so llvm executables are easier to debug. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43839
* Revert "Build clang and other llvm executables as PIE"Dimitry Andric2024-02-121-5/+1
| | | | | | | This reverts commit 470f9f13de10e47e6d45721c15af6b4abe7aad55. I need more time to figure out how to make this work correctly with incremental builds, which it currently miserably fails on.
* Build clang and other llvm executables as PIEDimitry Andric2024-02-111-1/+5
| | | | | | | | There is no reason anymore to not build these as PIE. Unfortunately bsd.lib.mk does not allow for building _only_ PIE static libraries, so lib/clang/Makefile.inc needs a kludge to work around that issue. MFC after: 1 week
* Add libllvm and liblldb source files to enable WITH_ASAN buildDimitry Andric2024-01-272-0/+7
| | | | | | | | | | This is another part of fixing the WITH_ASAN build. Some additional source files had to be added to libllvm and liblldb, since the ASan instrumentation causes symbols in those files to be referenced. Reported by: markj PR: 276597 MFC after: 3 days
* Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367Dimitry Andric2023-12-087-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.6-0-g6009708b4367. PR: 273753 MFC after: 1 month
* Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82Dimitry Andric2023-12-087-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.5-0-g98bfdac5ce82. PR: 273753 MFC after: 1 month
* Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600Dimitry Andric2023-12-087-15/+15
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.3-0-g888437e1b600. PR: 273753 MFC after: 1 month
* Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbdDimitry Andric2023-12-083-5/+5
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.2-0-gb2417f51dbbd. PR: 273753 MFC after: 1 month
* Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bedDimitry Andric2023-12-088-22/+30
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.1-25-g098e653a5bed. PR: 273753 MFC after: 1 month
* Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4Dimitry Andric2023-12-086-10/+10
| | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-17.0.0-rc4-10-g0176e8729ea4. PR: 273753 MFC after: 1 month
* Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51Dimitry Andric2023-12-0815-4439/+8415
| | | | | | | | | This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the last commit before the upstream release/17.x branch was created. PR: 273753 MFC after: 1 month