Skip to content

Add Kotlin/Native Tizen target support#5765

Open
rookiejava wants to merge 9 commits intoJetBrains:masterfrom
rookiejava:native/tizen-target-support
Open

Add Kotlin/Native Tizen target support#5765
rookiejava wants to merge 9 commits intoJetBrains:masterfrom
rookiejava:native/tizen-target-support

Conversation

@rookiejava
Copy link

@rookiejava rookiejava commented Mar 21, 2026

Summary

This PR adds initial Kotlin/Native Tizen target support across the Native target model, Kotlin Gradle Plugin APIs, and related target wiring.

Added targets:

  • tizen_arm32
  • tizen_arm64
  • tizen_x64

Related Issue

https://youtrack.jetbrains.com/issue/KT-85249/Add-Kotlin-Native-Tizen-target-support

What Was Added

Native target model and configuration

  • Added Tizen targets to KonanTarget
  • Added initial Tizen target configuration in konan.properties
  • Enabled Tizen targets in HostManager
  • Added Tizen platform width mappings

Gradle plugin and public API wiring

  • Added public KGP DSL for Tizen native targets
  • Added common source set conventions for shared Tizen source sets
  • Wired Tizen targets into KGP hierarchy and ABI-related APIs
  • Updated compileKotlin exhaustiveness handling for the new targets

Verification-related updates

  • Recorded API dump / compileKotlin verification updates needed for the new targets

Commit Breakdown

  • f7b137e Add Tizen targets to KonanTarget
    • Introduces tizen_arm32, tizen_arm64, and tizen_x64 in the Kotlin/Native target model.
  • f0738de Add initial Tizen target configuration
    • Adds initial konan.properties configuration for Tizen toolchains, sysroots, and linker settings.
    • Uses placeholder Tizen toolchain dependency IDs and documents that CDN tarballs are still required.
  • a0d93f8 Enable Tizen targets in HostManager
    • Wires Tizen targets into host enablement logic.
  • 97baf6e Add Tizen platform width mappings
    • Adds platform width/index handling required by the new targets.
  • a48de97 Add public KGP DSL for Tizen native targets
    • Exposes Tizen target configuration through the public Kotlin Gradle Plugin DSL.
  • 499de1f Wire Tizen targets into KGP hierarchy and ABI APIs
    • Connects the new targets to hierarchy templates and ABI-facing APIs.
  • 36f80e8 Handle Tizen targets in compileKotlin exhaustiveness checks
    • Extends exhaustive target handling for compiler/build logic.
  • 8398e6c Record Tizen API dump and compileKotlin verification
    • Updates generated verification outputs for the new target surface.
  • 2bd648f Add Tizen common source set conventions
    • Adds tizenMain and tizenTest source set conventions for shared code across Tizen targets.

Modified Areas

Primary files and why they changed:

  • native/utils/src/org/jetbrains/kotlin/konan/target/KonanTarget.kt
    • Added new Tizen targets.
  • native/utils/src/org/jetbrains/kotlin/konan/target/HostManager.kt
    • Enabled Tizen targets in host support logic.
  • kotlin-native/konan/konan.properties
    • Added target/toolchain/sysroot/linker configuration for Tizen.
    • Uses placeholder dependency IDs for Tizen toolchains until the corresponding CDN artifacts are published.
  • Kotlin Gradle Plugin target / ABI / hierarchy-related files
    • Added DSL exposure and target wiring for Tizen support.
  • Kotlin Gradle Plugin source set convention files
    • Added tizenMain and tizenTest common source set conventions.
  • Platform width/index handling files
    • Added Tizen width mappings used by Native infrastructure.
  • API dump / verification files
    • Updated generated verification outputs for the new target surface.

Local Verification

The following verifications were performed locally:

  • ./gradlew compileKotlin — ✅ BUILD SUCCESSFUL
  • No missing when() branches for Tizen targets detected
  • No unresolved references in modified source files

Known Limitation

End-to-end verification is currently constrained by bootstrap artifact usage in local development.

During local verification, Kotlin/Native build logic still resolved HostManager from the bootstrap artifact:

  • org.jetbrains.kotlin:kotlin-native-utils:2.4.0-dev-5318

Because of that bootstrap jar constraint, full end-to-end validation of Tizen target task registration and sample linking requires JetBrains CI or bootstrap-aligned internal infrastructure.

TODO

  • JetBrains needs to package and upload Tizen toolchain tarballs to:
    • https://download.jetbrains.com/kotlin/native/
    • Tizen toolchains can be installed via Tizen Package Manager:
    • After installation, toolchains are located at:
      • Tizen Studio: ~/tizen-studio/tools/
      • VS Code Tizen Extension: ~/.tizen-extension-platform/server/sdktools/data/tools/
    • Required toolchain directories to package:
      • arm-linux-gnueabi-gcc-14.2/arm-tizen-linux-gnueabi (for tizen_arm32)
      • aarch64-linux-gnu-gcc-14.2/aarch64-tizen-linux-gnu (for tizen_arm64)
      • x86_64-linux-gnu-gcc-14.2/x86_64-tizen-linux-gnu (for tizen_x64)
    • Once packaged and uploaded, replace placeholder dependency IDs
      in konan.properties with the actual artifact names
  • Document the konan.properties local candidate pattern for contributors using a local Tizen SDK
  • Add a sample project in a follow-up PR

@kotlin-safe-merge
Copy link

Code Owners

Rule Owners Approval
/​kotlin-​native/​, /​native/​ kotlin-native
/​libraries/​tools/​abi-​validation/​ kotlin-libraries
/​libraries/​tools/​kotlin-​gradle-​plugin-​api/​, /​libraries/​tools/​kotlin-​gradle-​plugin-​dsl-​codegen/​, /​libraries/​tools/​kotlin-​gradle-​plugin/​ kotlin-build-tools
/​native/​commonizer/​ kotlin-frontend
/​native/​native.​tests/​ kotlin-common-backend, kotlin-native

@rookiejava rookiejava force-pushed the native/tizen-target-support branch from e9f8c87 to 2bd648f Compare March 21, 2026 03:25
@rookiejava rookiejava force-pushed the native/tizen-target-support branch from 2bd648f to 90db383 Compare March 25, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant