Skip to content

Commit da94927

Browse files
committed
Add support for flags to build on iOS
1 parent 7177ee1 commit da94927

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

build-tools/build_v8.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ EXTRA_ARGS=""
3232
if [ "${OS}" = "linux" ] && [ "${ARCH}" == "arm64" ]; then
3333
EXTRA_ARGS="clang_base_path=\"/usr/lib/llvm-21\" clang_use_chrome_plugins=false treat_warnings_as_errors=false"
3434
fi
35+
if [ "${OS}" = "ios" ]; then
36+
EXTRA_ARGS="v8_enable_pointer_compression=false v8_enable_webassembly=false"
37+
fi
3538

3639
TARGET_ARCH=${ARCH}
3740
if [ "${ARCH}" = "amd64" ]; then

build-tools/utils.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ case $(uname -m) in
2323
*) fail "unsupported architecture: $(uname -m)"
2424
esac
2525

26-
case "$OSTYPE" in
27-
darwin*) OS="mac" ;;
28-
linux*) OS="linux" ;;
29-
*) fail "unsupported platform: ${OSTYPE}"
30-
esac
26+
: "${OS:=unset}"
27+
case "$OS" in
28+
unset)
29+
case "$OSTYPE" in
30+
darwin*) OS="mac" ;;
31+
linux*) OS="linux" ;;
32+
*) fail "unsupported platform: ${OSTYPE}"
33+
esac
34+
;;
35+
esac

build.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ pub fn build(b: *std.Build) !void {
132132
const os = switch (target.result.os.tag) {
133133
.linux => "linux",
134134
.macos => "macos",
135+
.ios => "ios",
135136
else => return error.UnsupportedPlatform,
136137
};
137138

0 commit comments

Comments
 (0)