fastai / swiftai

Swift for TensorFlow's high-level API, modeled after fastai
Apache License 2.0
458 stars 51 forks source link

Specifying macOs 10.13 as build target. #3

Closed vguerra closed 5 years ago

vguerra commented 5 years ago

The code base uses APIs available from macOS 10.13 hence to build the library one has to:

swift build -Xswiftc -target -Xswiftc x86_64-apple-macosx10.13

Since swift 5 one can use the platforms parameter for Package.init to specify desired target which has to nice advantages:

In order to take advantage of this functionality swift-tools-version needs to bumped. Which is ok since S4TF toolchain is needed to build this pkg.

vguerra commented 5 years ago

Question: I know that this repo is built from the course notebooks, the Package.swift is as well generated automatically or only the files under Sources?

If the entire repo is built automatically, it would be nice to apply this change as well to the conversion code.

fkautz commented 5 years ago

This appears to be necessary to fix build breaks on OSX.

sgugger commented 5 years ago

The Packages.swift file is create manually for now, so this fix can be applied directly. Thanks for flagging!