Files
tinygo/targets
deadprogram 0ffa3eb748 all: add LLVM 22 support
Builder:
- Update clang.cpp for LLVM 22 API changes: DiagnosticOptions is no
  longer ref-counted, TextDiagnosticPrinter and DiagnosticsEngine take
  references instead of pointers, createDiagnostics() signature changed.
- Update cc1as.cpp: clang/Driver/Options.h moved to
  clang/Options/Options.h, namespace changed from clang::driver::options
  to clang::options, MCInstPrinter now passed as unique_ptr.
- Add new LLVM 22 libraries to GNUmakefile: clangAnalysisLifetimeSafety,
  clangOptions, LLVMDTLTO, and dtlto component.
- Add llvm22 build tag to all build/test commands.

CGo:
- Handle CXType_Unexposed in libclang.go by resolving via canonical
  type. LLVM 22 reports builtin type aliases (e.g. __size_t) as
  Unexposed instead of Typedef.
- Always make C typedefs into Go type aliases. LLVM 22 changed
  getTypedefDeclUnderlyingType to return CXType_Enum directly instead
  of wrapping in an elaborated type.

Compileopts:
- Add build-tag-guarded ClangTriple() to substitute wasm32-unknown-wasi
  with wasm32-unknown-wasip1 for LLVM 22 (deprecated triple).
- Add build-tag-guarded patchFeatures() to map renamed Xtensa features
  (atomctl, memctl, timerint, esp32s3) for LLVM 22.

Targets:
- Remove -zca from RISC-V target feature strings (esp32c3, esp32c6,
  fe310, k210, riscv-qemu, tkey). LLVM 22 now implies +zca from +c.
- Remove -zcd from k210. LLVM 22 now implies +zcd from +c,+d.

Tests:
- Change TestClangAttributes to check individual feature flags instead
  of exact string match, allowing new LLVM features without failures.
- Update TestBinarySize expected values for LLVM 22 codegen.

Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-07-17 19:06:57 +02:00
..
2026-01-06 23:12:02 +01:00
2025-06-13 16:19:10 +02:00
2023-05-20 21:18:02 +02:00
2022-11-06 09:05:05 +01:00
2022-11-18 18:40:38 +01:00
2023-05-20 21:18:02 +02:00
2023-05-20 21:18:02 +02:00
2023-10-01 18:32:15 +02:00
2023-06-01 21:04:36 +02:00
2022-04-23 08:45:46 +02:00
2022-04-23 08:45:46 +02:00
2025-01-20 06:15:33 +01:00
2025-01-20 06:15:33 +01:00
2025-01-20 06:15:33 +01:00
2025-01-20 06:15:33 +01:00
2023-04-26 23:07:52 +02:00
2025-01-20 06:15:33 +01:00
2026-07-17 19:06:57 +02:00
2026-07-17 19:06:57 +02:00
2020-09-09 19:17:11 +02:00
2026-07-17 19:06:57 +02:00
2021-09-05 19:59:26 +02:00
2025-09-20 08:35:34 +02:00
2026-07-17 19:06:57 +02:00
2024-05-12 16:09:27 +02:00
2021-03-04 15:46:05 +01:00
2022-07-16 08:31:22 +02:00
2022-12-16 21:26:49 +01:00
2018-10-06 13:04:14 +02:00
2019-11-16 21:57:18 +01:00
2020-10-20 19:13:43 +02:00
2022-12-16 21:26:49 +01:00
2020-10-20 19:13:43 +02:00
2022-12-16 21:26:49 +01:00
2022-12-16 21:26:49 +01:00
2018-10-18 15:07:06 +02:00
2020-07-13 12:35:53 +02:00
2020-02-18 23:34:56 +01:00
2020-02-18 23:34:56 +01:00
2020-02-18 23:34:56 +01:00
2021-03-28 21:38:05 +02:00
2023-05-09 19:44:00 +02:00
2025-09-17 05:28:06 -04:00
2023-09-18 21:58:02 +02:00
2026-07-17 19:06:57 +02:00
2026-04-17 10:33:07 +02:00
2018-09-22 01:51:44 +02:00
2020-12-15 06:51:35 +01:00
2026-01-06 23:12:02 +01:00
2026-01-06 23:12:02 +01:00
2026-01-06 23:12:02 +01:00
2026-05-28 18:05:24 +02:00
2021-03-23 08:33:59 +01:00
2022-01-13 07:56:08 +01:00
2024-04-19 20:50:00 +02:00
2020-07-08 21:58:15 +02:00
2020-11-11 18:34:47 +01:00
2024-02-23 14:00:57 +01:00
2026-07-17 19:06:57 +02:00
2025-09-17 05:28:06 -04:00
2025-09-17 05:28:06 -04:00