-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump,enable(main/librusty-v8): 130.0.1
- Loading branch information
Showing
7 changed files
with
70 additions
and
151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
diff --git a/BUILD.gn b/BUILD.gn | ||
index 3de64b8..b3a0dd3 100644 | ||
--- a/BUILD.gn | ||
+++ b/BUILD.gn | ||
@@ -47,4 +47,14 @@ config("rusty_v8_config") { | ||
"-fansi-escape-codes", | ||
] | ||
} | ||
+ | ||
+ cflags_c = [] | ||
+ foreach(flag, string_split(getenv("CFLAGS"))) { | ||
+ cflags_c += [ flag ] | ||
+ } | ||
+ | ||
+ cflags_cc = [] | ||
+ foreach(flag, string_split(getenv("CXXFLAGS"))) { | ||
+ cflags_cc += [ flag ] | ||
+ } | ||
} |
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,51 @@ | ||
TERMUX_PKG_HOMEPAGE=https://github.com/denoland/rusty_v8 | ||
TERMUX_PKG_DESCRIPTION="High quality Rust bindings to V8's C++ API" | ||
TERMUX_PKG_LICENSE="MIT" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION=130.0.1 | ||
TERMUX_PKG_SRCURL=git+https://github.com/denoland/rusty_v8 | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_NO_STATICSPLIT=true | ||
|
||
# to reduce compilation time | ||
_SCCACHE_VERSION=0.8.2 | ||
_SCACCHE_SHA256=ecda4ddc89a49f1ec6f35bdce5ecbf6f205b399a680d11119d4ce9f6d962104e | ||
|
||
termux_step_configure() { | ||
termux_setup_rust | ||
termux_setup_ninja | ||
termux_setup_gn | ||
|
||
GN="$(command -v gn)" | ||
export GN | ||
|
||
mkdir -p "${TERMUX_PKG_CACHEDIR}/sccache" | ||
termux_download \ | ||
"https://github.com/mozilla/sccache/releases/download/v${_SCCACHE_VERSION}/sccache-v${_SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ | ||
"${TERMUX_PKG_CACHEDIR}/sccache.tar.gz" \ | ||
"${_SCACCHE_SHA256}" | ||
tar -zxf "${TERMUX_PKG_CACHEDIR}/sccache.tar.gz" --strip-components=1 -C "${TERMUX_PKG_CACHEDIR}/sccache" | ||
export SCCACHE="${TERMUX_PKG_CACHEDIR}/sccache/sccache" | ||
} | ||
|
||
termux_step_make() { | ||
export CLANG_BASE_PATH="${TERMUX_STANDALONE_TOOLCHAIN}/sysroot/usr" | ||
# workaround for cargo to detect and use CI's clang/clang++ | ||
ln -s "${TERMUX_STANDALONE_TOOLCHAIN}/bin" "${CLANG_BASE_PATH}/bin" | ||
|
||
export CARGO_CFG_TARGET_OS=android | ||
case ${TERMUX_ARCH} in | ||
i686) CARGO_CFG_TARGET_ARCH=x86 ;; | ||
*) CARGO_CFG_TARGET_ARCH=${TERMUX_ARCH} ;; | ||
esac | ||
export CARGO_CFG_TARGET_ARCH | ||
|
||
export TARGET="${TERMUX_HOST_PLATFORM}" | ||
|
||
export V8_FROM_SOURCE=1 | ||
cargo build -vv --jobs "${TERMUX_PKG_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release | ||
} | ||
|
||
termux_step_make_install() { | ||
install -Dm600 -t "${TERMUX_PREFIX}/lib" "target/${CARGO_TARGET_NAME}/release/gn_out/obj/librusty_v8.a" | ||
} |