Skip to content

Optimize build #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build-tools/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ default_args = {
v8_embedder_string = "-lightpanda"

v8_enable_sandbox = false
v8_enable_javascript_promise_hooks = true
v8_promise_internal_field_count = 1
v8_use_external_startup_data = false

v8_enable_pointer_compression = true
Expand Down Expand Up @@ -96,4 +94,7 @@ default_args = {
use_relative_vtables_abi = false

icu_use_data_file = false

v8_enable_turbofan = true
v8_enable_webassembly = false
}
8 changes: 5 additions & 3 deletions build-tools/build_v8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ if [ "${OS}" = "mac" ]; then
fi
OUT=out/${OUT_OS_PATH}/${MODE}

EXTRA_ARGS=""
if [[ ${MODE} == "release" ]]; then
IS_DEBUG="false"
SYMBOL_LEVEL="0"
else
IS_DEBUG="true"
SYMBOL_LEVEL="1"
EXTRA_ARGS="v8_enable_object_print = true"
fi

mkdir -p src/zig
cp BUILD.gn src/zig/

EXTRA_ARGS=""
if [ "${OS}" = "linux" ] && [ "${ARCH}" == "arm64" ]; then
EXTRA_ARGS="clang_base_path=\"/usr/lib/llvm-21\" clang_use_chrome_plugins=false treat_warnings_as_errors=false"
EXTRA_ARGS="${EXTRA_ARGS} clang_base_path=\"/usr/lib/llvm-21\" clang_use_chrome_plugins=false treat_warnings_as_errors=false"
fi

TARGET_ARCH=${ARCH}
Expand All @@ -49,7 +50,8 @@ tools/gn \
host_cpu=\"${TARGET_ARCH}\"
is_debug=${IS_DEBUG}
symbol_level=${SYMBOL_LEVEL}
is_official_build=false ${EXTRA_ARGS}
is_official_build=false
${EXTRA_ARGS}
"

tools/ninja -C ${OUT} "c_v8"