-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into dev
- Loading branch information
Showing
6 changed files
with
46 additions
and
6 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 |
---|---|---|
@@ -1,8 +1,27 @@ | ||
#!/bin/bash | ||
|
||
export OHOS_NDK_HOME=/mnt/f/ohos-sdk-windows_linux-public/linux/ | ||
export LOG_ADAPTOR_HOME=/mnt/f/log-adaptor | ||
|
||
export CC=$OHOS_NDK_HOME/native/llvm/bin/clang | ||
export CXX=$OHOS_NDK_HOME/native/llvm/bin/clang++ | ||
export AR=$OHOS_NDK_HOME/native/llvm/bin/llvm-ar | ||
export AS=$OHOS_NDK_HOME/native/llvm/bin/llvm-as | ||
export LD=$OHOS_NDK_HOME/native/llvm/bin/ld.lld | ||
export STRIP=$OHOS_NDK_HOME/native/llvm/bin/llvm-strip | ||
export RANLIB=$OHOS_NDK_HOME/native/llvm/bin/llvm-ranlib | ||
export OBJDUMP=$OHOS_NDK_HOME/native/llvm/bin/llvm-objdump | ||
export OBJCOPY=$OHOS_NDK_HOME/native/llvm/bin/llvm-objcopy | ||
export NM=$OHOS_NDK_HOME/native/llvm/bin/llvm-nm | ||
export CFLAGS="-target x86_64-linux-ohos --sysroot=${OHOS_NDK_HOME}/native/sysroot -D__MUSL__" | ||
export CXXFLAGS="-target x86_64-linux-ohos --sysroot=${OHOS_NDK_HOME}/native/sysroot -D__MUSL__" | ||
export LLVMCONFIG=$OHOS_NDK_HOME/native/llvm/bin/llvm-config | ||
|
||
export GOPROXY=https://mirrors.aliyun.com/goproxy/ | ||
export CGO_ENABLED=1 | ||
export GOOS=android | ||
export GOARCH=amd64 | ||
export CC=/mnt/f/ohos-sdk-windows_linux-public/linux/native/llvm/bin/x86_64-unknown-linux-ohos-clang | ||
export CGO_CFLAGS="-I${LOG_ADAPTOR_HOME}/include -g -O2 `$LLVMCONFIG --cflags` --target=x86_64-linux-ohos --sysroot=$OHOS_NDK_HOME/native/sysroot" | ||
export CGO_LDFLAGS="--target=x86_64-linux-ohos -fuse-ld=lld -L${LOG_ADAPTOR_HOME}/dist/x86_64" | ||
|
||
go build --tags fts5 -ldflags "-s -w" -buildmode=c-shared -v -o libkernel.so . |
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,27 @@ | ||
#!/bin/bash | ||
|
||
export OHOS_NDK_HOME=/mnt/f/ohos-sdk-windows_linux-public/linux/ | ||
export LOG_ADAPTOR_HOME=/mnt/f/log-adaptor | ||
|
||
export CC=$OHOS_NDK_HOME/native/llvm/bin/clang | ||
export CXX=$OHOS_NDK_HOME/native/llvm/bin/clang++ | ||
export AR=$OHOS_NDK_HOME/native/llvm/bin/llvm-ar | ||
export AS=$OHOS_NDK_HOME/native/llvm/bin/llvm-as | ||
export LD=$OHOS_NDK_HOME/native/llvm/bin/ld.lld | ||
export STRIP=$OHOS_NDK_HOME/native/llvm/bin/llvm-strip | ||
export RANLIB=$OHOS_NDK_HOME/native/llvm/bin/llvm-ranlib | ||
export OBJDUMP=$OHOS_NDK_HOME/native/llvm/bin/llvm-objdump | ||
export OBJCOPY=$OHOS_NDK_HOME/native/llvm/bin/llvm-objcopy | ||
export NM=$OHOS_NDK_HOME/native/llvm/bin/llvm-nm | ||
export CFLAGS="-target aarch64-linux-ohos --sysroot=${OHOS_NDK_HOME}/native/sysroot -D__MUSL__" | ||
export CXXFLAGS="-target aarch64-linux-ohos --sysroot=${OHOS_NDK_HOME}/native/sysroot -D__MUSL__" | ||
export LLVMCONFIG=$OHOS_NDK_HOME/native/llvm/bin/llvm-config | ||
|
||
export GOPROXY=https://mirrors.aliyun.com/goproxy/ | ||
export CGO_ENABLED=1 | ||
export GOOS=android | ||
export GOARCH=arm64 | ||
export CC=/mnt/f/ohos-sdk-windows_linux-public/linux/native/llvm/bin/aarch64-unknown-linux-ohos-clang | ||
export CGO_CFLAGS="-I${LOG_ADAPTOR_HOME}/include -g -O2 `$LLVMCONFIG --cflags` --target=aarch64-linux-ohos --sysroot=$OHOS_NDK_HOME/native/sysroot" | ||
export CGO_LDFLAGS="--target=aarch64-linux-ohos -fuse-ld=lld -L${LOG_ADAPTOR_HOME}/dist/arm64-v8a" | ||
|
||
go build --tags fts5 -ldflags "-s -w" -buildmode=c-shared -v -o libkernel.so . |
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