Skip to content

improved embedded support for building with SwiftPM - #267

Merged
kateinoigakukun merged 5 commits into
swiftwasm:mainfrom
sliemeobn:embedded/build-flags
Oct 31, 2024
Merged

improved embedded support for building with SwiftPM#267
kateinoigakukun merged 5 commits into
swiftwasm:mainfrom
sliemeobn:embedded/build-flags

Conversation

@sliemeobn

Copy link
Copy Markdown
Contributor

Having to provide a lot of external flags to swift build is not ideal and basically breaks down when adding swift macro targets.

This PR pushes the currently required flags into the Package.swift file to allow building without any global flags provided to the build command.

NOTE: The __Embedded define for the C target configuration did not play well with SwiftPM, so I based the logic on __wasi__ (thanks @MaxDesiatov for the idea). However, it is not a perfect match and I hope a better solution will present itself in the future.

@kateinoigakukun
kateinoigakukun merged commit 64e2e11 into swiftwasm:main Oct 31, 2024
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.

2 participants