Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Conversation

ianpartridge
Copy link
Collaborator

@ianpartridge ianpartridge commented Sep 3, 2019

It's best practice to avoid platform conditional code in Package.swift.

  1. Change the vendoring script so it wraps all the C code in #ifdef __linux__, so it can compile on macOS too (but does nothing).
  2. Re-run the script so the C code is appropriately wrapped.
  3. Update the Package.swift files to remove the conditional compilation.

Result: happy cross-compilers

Fixes: #16

CC: @weissi

Copy link
Collaborator

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks so much!

@ianpartridge ianpartridge merged commit eaf2cef into master Sep 3, 2019
@ianpartridge ianpartridge deleted the cross-compilation branch September 3, 2019 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

should be able to be cross-compiled
2 participants