-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
site: Update docs, add some details about Xcode
- Loading branch information
1 parent
c81910d
commit f4351f7
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Developing with Xcode | ||
|
||
The recommended editor for working with the native C code is Xcode. Even for non-Apple targets. | ||
|
||
This works thanks to crossclang, also see [Cross-compiling junixsocket](crosscomp.html). | ||
|
||
## Setup | ||
|
||
In order to develop with Xcode, using crossclang, you need to install a custom Xcode SDK. | ||
|
||
Run the following script from the Terminal, which creates a symbolic link under | ||
`~/Library/Developer/Toolchains` to the `crossclang.sdk`, which essentially tells Xcode to use | ||
our "crossclang" clang wrapper script instead of its built-in version, among other things. | ||
|
||
./junixsocket-native/crossclang/Xcode-Support/install | ||
|
||
You then need to: | ||
|
||
1. Restart Xcode | ||
2. Set the Toolchain to "crossclang" (via Xcode -> Toolchains..., or via a button in the launch window) | ||
3. Open junixsocket-native.xcodeproj | ||
4. Run "Clean Build Folder" | ||
5. Run "Build" | ||
|
||
Note that you need to switch back to the default Xcode Toolchain when you develop other projects. | ||
|
||
## Building from the command-line | ||
|
||
AFter installing the "crossclang" Toolchain, you can also build from the command-line. | ||
In this case, you don't have to switch the Toolchain via Xcode: | ||
|
||
xcodebuild -project junixsocket-native/junixsocket-native.xcodeproj -configuration Release \ | ||
-target "All Architectures" -toolchain crossclang USE_HEADERMAP=NO \ | ||
CURRENT_ARCH=undefined_arch arch=undefined_arch ARCHS=arm64 CODE_SIGNING_ALLOWED=NO \ | ||
clean build |