Skip to content

Cross-compiling packages which contain macros doesn't work #6950

@finagolfin

Description

@finagolfin

Description

@woxiang04 reported in the forum that they couldn't cross-compile the macro examples, and @neonichu said that doesn't work yet. I am unsure what this entails, as presumably the official Swift 5.9 toolchain for macOS can cross-compile code with macros for iOS?

I have not tried this myself, just reporting that error from the forum.

Expected behavior

Macros to work when cross-compiling a package

Actual behavior

According to that forum thread:

compiler plugin not loaded: /data/Downloads/swift-macro-examples/.build/aarch64-unknown-linux-android24/debug/MacroExamplesPlugin; loader error: Exec format error

Steps to reproduce

  1. Build the Swift macro examples with a cross-compilation SDK

Swift Package Manager version/commit hash

5.9

Swift & OS version (output of swift --version ; uname -a)

5.9 for Ubuntu 20.04 x86_64 cross-compiling to Android AArch64

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