mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Merge pull request #683 from lightpanda-io/libc_v8_out_path_include_os
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
include OS in libc_v8 lib path
This commit is contained in:
10
.github/actions/install/action.yml
vendored
10
.github/actions/install/action.yml
vendored
@@ -17,7 +17,7 @@ inputs:
|
|||||||
zig-v8:
|
zig-v8:
|
||||||
description: 'zig v8 version to install'
|
description: 'zig v8 version to install'
|
||||||
required: false
|
required: false
|
||||||
default: 'v0.1.23'
|
default: 'v0.1.24'
|
||||||
v8:
|
v8:
|
||||||
description: 'v8 version to install'
|
description: 'v8 version to install'
|
||||||
required: false
|
required: false
|
||||||
@@ -59,11 +59,11 @@ runs:
|
|||||||
- name: install v8
|
- name: install v8
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p v8/out/debug/obj/zig/
|
mkdir -p v8/out/${{ inputs.os }}/debug/obj/zig/
|
||||||
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/debug/obj/zig/libc_v8.a
|
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/debug/obj/zig/libc_v8.a
|
||||||
|
|
||||||
mkdir -p v8/out/release/obj/zig/
|
mkdir -p v8/out/${{ inputs.os }}/release/obj/zig/
|
||||||
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/release/obj/zig/libc_v8.a
|
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/release/obj/zig/libc_v8.a
|
||||||
|
|
||||||
- name: libiconv
|
- name: libiconv
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ ARG ZIG=0.14.0
|
|||||||
ARG ZIG_MINISIG=RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
|
ARG ZIG_MINISIG=RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
|
||||||
ARG ARCH=x86_64
|
ARG ARCH=x86_64
|
||||||
ARG V8=11.1.134
|
ARG V8=11.1.134
|
||||||
ARG ZIG_V8=v0.1.23
|
ARG ZIG_V8=v0.1.24
|
||||||
|
|
||||||
RUN apt-get update -yq && \
|
RUN apt-get update -yq && \
|
||||||
apt-get install -yq xz-utils \
|
apt-get install -yq xz-utils \
|
||||||
@@ -57,8 +57,8 @@ RUN make install-libiconv && \
|
|||||||
|
|
||||||
# download and install v8
|
# download and install v8
|
||||||
RUN curl --fail -L -o libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${ZIG_V8}/libc_v8_${V8}_linux_${ARCH}.a && \
|
RUN curl --fail -L -o libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${ZIG_V8}/libc_v8_${V8}_linux_${ARCH}.a && \
|
||||||
mkdir -p v8/build/${ARCH}-linux/release/ninja/obj/zig/ && \
|
mkdir -p v8/out/linux/release/obj/zig/ && \
|
||||||
mv libc_v8.a v8/build/${ARCH}-linux/release/ninja/obj/zig/libc_v8.a
|
mv libc_v8.a v8/out/linux/release/obj/zig/libc_v8.a
|
||||||
|
|
||||||
# build release
|
# build release
|
||||||
RUN make build
|
RUN make build
|
||||||
|
|||||||
30
build.zig
30
build.zig
@@ -170,13 +170,30 @@ fn common(b: *std.Build, opts: *std.Build.Step.Options, step: *std.Build.Step.Co
|
|||||||
mod.addImport("v8", v8_mod);
|
mod.addImport("v8", v8_mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
const lib_path = try std.fmt.allocPrint(
|
|
||||||
mod.owner.allocator,
|
|
||||||
"v8/out/{s}/obj/zig/libc_v8.a",
|
|
||||||
.{if (mod.optimize.? == .Debug) "debug" else "release"},
|
|
||||||
);
|
|
||||||
mod.link_libcpp = true;
|
mod.link_libcpp = true;
|
||||||
mod.addObjectFile(mod.owner.path(lib_path));
|
|
||||||
|
{
|
||||||
|
const release_dir = if (mod.optimize.? == .Debug) "debug" else "release";
|
||||||
|
const os = switch (target.result.os.tag) {
|
||||||
|
.linux => "linux",
|
||||||
|
.macos => "macos",
|
||||||
|
else => return error.UnsupportedPlatform,
|
||||||
|
};
|
||||||
|
var lib_path = try std.fmt.allocPrint(
|
||||||
|
mod.owner.allocator,
|
||||||
|
"v8/out/{s}/{s}/obj/zig/libc_v8.a",
|
||||||
|
.{ os, release_dir },
|
||||||
|
);
|
||||||
|
std.fs.cwd().access(lib_path, .{}) catch {
|
||||||
|
// legacy path
|
||||||
|
lib_path = try std.fmt.allocPrint(
|
||||||
|
mod.owner.allocator,
|
||||||
|
"v8/out/{s}/obj/zig/libc_v8.a",
|
||||||
|
.{release_dir},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
mod.addObjectFile(mod.owner.path(lib_path));
|
||||||
|
}
|
||||||
|
|
||||||
switch (target.result.os.tag) {
|
switch (target.result.os.tag) {
|
||||||
.macos => {
|
.macos => {
|
||||||
@@ -188,7 +205,6 @@ fn common(b: *std.Build, opts: *std.Build.Step.Options, step: *std.Build.Step.Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod.addImport("build_config", opts.createModule());
|
mod.addImport("build_config", opts.createModule());
|
||||||
mod.addObjectFile(mod.owner.path(lib_path));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn moduleNetSurf(b: *std.Build, step: *std.Build.Step.Compile, target: std.Build.ResolvedTarget) !void {
|
fn moduleNetSurf(b: *std.Build, step: *std.Build.Step.Compile, target: std.Build.ResolvedTarget) !void {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
.hash = "tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd",
|
.hash = "tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd",
|
||||||
},
|
},
|
||||||
.v8 = .{
|
.v8 = .{
|
||||||
.url = "https://github.com/lightpanda-io/zig-v8-fork/archive/240140e5b3e5a8e5e51cbdd36bc120bf28ae5c31.tar.gz",
|
.url = "https://github.com/lightpanda-io/zig-v8-fork/archive/e38cb27ddb044c6afbf8a938b293721b9804405e.tar.gz",
|
||||||
.hash = "v8-0.0.0-xddH64eyAwBcX7e2x5tv9MhT0MgQbshP2rb19blo06Db",
|
.hash = "v8-0.0.0-xddH6_GzAwCaz83JWuw3sepOGq0I7C_CmfOwA1Gb9q3y",
|
||||||
},
|
},
|
||||||
//.v8 = .{ .path = "../zig-v8-fork" },
|
//.v8 = .{ .path = "../zig-v8-fork" },
|
||||||
//.tigerbeetle_io = .{ .path = "../tigerbeetle-io" },
|
//.tigerbeetle_io = .{ .path = "../tigerbeetle-io" },
|
||||||
|
|||||||
Reference in New Issue
Block a user