-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add aarach64 for osx * update version to provide gmp for aarch64 * Built shared libs Co-authored-by: Builder <[email protected]>
- Loading branch information
Showing
7 changed files
with
27 additions
and
10 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
Binary file not shown.
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 |
---|---|---|
@@ -1,12 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# ref: https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.html | ||
# ref from | ||
## https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.html | ||
## https://github.com/CosmWasm/wasmvm/blob/v1.1.1/builders/Dockerfile.cross | ||
export OSXCROSS_MP_INC=1 | ||
export LIBZ_SYS_STATIC=1 | ||
export CC=o64-clang | ||
export CXX=o64-clang++ | ||
|
||
cd go-owasm/libgo_owasm | ||
rustup target add x86_64-apple-darwin | ||
|
||
echo "Starting aarch64-apple-darwin build" | ||
export CC=aarch64-apple-darwin20.4-clang | ||
export CXX=aarch64-apple-darwin20.4-clang++ | ||
cargo build --release --target aarch64-apple-darwin | ||
|
||
echo "Starting x86_64-apple-darwin build" | ||
export CC=o64-clang | ||
export CXX=o64-clang++ | ||
cargo build --release --target x86_64-apple-darwin | ||
cp target/x86_64-apple-darwin/release/deps/libgo_owasm.dylib ./../api | ||
|
||
# Create a universal library with both archs | ||
lipo -output ./../api/libgo_owasm.dylib -create \ | ||
target/x86_64-apple-darwin/release/deps/libgo_owasm.dylib \ | ||
target/aarch64-apple-darwin/release/deps/libgo_owasm.dylib |
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,3 +1,7 @@ | ||
[target.x86_64-apple-darwin] | ||
linker = "x86_64-apple-darwin20.4-clang" | ||
ar = "x86_64-apple-darwin20.4-ar" | ||
|
||
[target.aarch64-apple-darwin] | ||
linker = "aarch64-apple-darwin20.4-clang" | ||
ar = "aarch64-apple-darwin20.4-ar" |
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