-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: gen dylib scripts * gen_ios_dylib.sh * build: change script * Update gen_ios_dylib.sh
- Loading branch information
Showing
8 changed files
with
39 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# openim-sdk-cpp | ||
# openim-sdk-cpp | ||
|
||
openim-sdk-core |
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 |
---|---|---|
@@ -1,8 +1,21 @@ | ||
export GOOS=darwin | ||
export GOARCH=arm64 | ||
export CGO_ENABLED=1 | ||
export CC=clang | ||
|
||
go build -buildmode=c-shared -o libopenimsdk.dylib export.go protocol.go message.go | ||
|
||
|
||
#!/bin/sh | ||
export LANG=en_US.UTF-8 | ||
# ios device | ||
export CFLAGS="-arch arm64 -miphoneos-version-min=9.0 -isysroot "$(xcrun -sdk iphoneos --show-sdk-path) | ||
export CGO_LDFLAGS="-arch arm64 -miphoneos-version-min=9.0 -isysroot "$(xcrun -sdk iphoneos --show-sdk-path) | ||
export CGO_ENABLED=1 | ||
export GOARCH=arm64 | ||
export GOOS=ios | ||
export CC="clang $CFLAGS $CGO_LDFLAGS" | ||
go build -tags ios -ldflags=-w -trimpath -v -o libopenimsdk.a -buildmode c-archive export.go protocol.go message.go | ||
# go build -tags ios -ldflags=-w -trimpath -v -o libopenimsdk_ios.a -buildmode c-archive export.go protocol.go message.go | ||
# ios simulator | ||
# export CFLAGS="-arch x86_64 -miphoneos-version-min=9.0 -isysroot "$(xcrun -sdk iphonesimulator --show-sdk-path) | ||
# export CGO_LDFLAGS="-arch x86_64 -miphoneos-version-min=9.0 -isysroot "$(xcrun -sdk iphonesimulator --show-sdk-path) | ||
# CGO_ENABLED=1 | ||
# GOARCH=amd64 | ||
# GOOS=darwin | ||
# CC="clang $CFLAGS $CGO_LDFLAGS" | ||
# go build -tags ios -ldflags=-w -trimpath -v -o libopenimsdk_iossimulator.a -buildmode c-archive | ||
|
||
# lipo -create libopenimsdk_ios.a libopenimsdk_iossimulator.a -output libopenimsdk.a |
File renamed without changes.
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,9 @@ | ||
export GOOS=darwin | ||
export CGO_ENABLED=1 | ||
export CC=clang | ||
export GOARCH=arm64 | ||
go build -buildmode=c-shared -o libopenimsdk_arm64.dylib export.go protocol.go message.go | ||
|
||
export GOARCH=amd64 | ||
go build -buildmode=c-shared -o libopenimsdk_amd64.dylib export.go protocol.go message.go | ||
lipo -create -output libopenimsdk.dylib libopenimsdk_arm64.dylib libopenimsdk_amd64.dylib |
File renamed without changes.
File renamed without changes.
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