Permalink
Browse files

Add steps for compiling under Xcode (#58)

  • Loading branch information...
dave-fernandes authored and rxwei committed Aug 22, 2018
1 parent 7dc7f2f commit 8a7f815a681431bae248ba3ebccd32eac8dd9cf1
Showing with 12 additions and 0 deletions.
  1. +12 −0 Usage.md
View
@@ -141,3 +141,15 @@ print(x)
</p>
**Note:** Xcode Playgrounds are a great interactive environment for prototyping code, but they often hang or crash. If that happens, try restarting Xcode. There are some documented bugs regarding Swift for TensorFlow and Playgrounds. If you discover a new bug, please file an issue.
To build an executable with Xcode 10, you must change some project settings from their default values:
1. In the menu bar, select `File > Project Settings...`.
2. Then, select `Legacy Build System` for Build Settings and click `Done`.
3. In your target's Build Settings:
* Go to `Swift Compiler > Code Generation > Optimization Level` and select `Optimize for Speed [-O]`.
* Add `libtensorflow.so` and `libtensorflow_framework.so` to `Linked Frameworks and Libraries` and change `Runtime Search Paths`.
See [this comment](https://github.com/tensorflow/swift/issues/10#issuecomment-385167803) for specific instructions with screenshots.
* Go to `Linking > Other Linker Flags` and add `-lpython` to the list of flags.

0 comments on commit 8a7f815

Please sign in to comment.