Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
Add steps for compiling under Xcode (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Fernandes authored and rxwei committed Aug 22, 2018
1 parent 7dc7f2f commit 8a7f815
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Usage.md
Expand Up @@ -141,3 +141,15 @@ print(x)
</p> </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. **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.