Skip to content

Tasks of type org.gradle.nativeplatform.tasks.LinkMachOBundle fail after upgrading the project to Gradle 9 #1126

@cdsap

Description

@cdsap

Expected Behavior

Tasks of type org.gradle.nativeplatform.tasks.LinkMachOBundle fail after upgrading the project to Gradle 9, with:

Caused by: org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocationFailure: Linker failed while linking AppTest.

This issue is only reproducible with Gradle 9 builds, it works with Gradle 8.14.3. It is also reproducible locally.

Current Behavior

No response

Context

No response

Steps to Reproduce

I used the native sample provided in the Gradle docs:

  1. git clone git@github.com:cdsap/SwiftGradle9Issue.git
  2. ./gradlew build

Main branch has 9.3.0 and fails, the reproducer has a 8.14.3 branch that works correctly

Your Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions