Skip to content

Commit bad207b

Browse files
committed
Upgrade to 14.0.365.4 (latest stable)
Improve build script so that dependency revisions are extracted from v8's src/DEPS For the time being, we disable the new temporal support, since it requires a rust toolchain to compile, and I rather do this incrementally.
1 parent d3040a9 commit bad207b

File tree

6 files changed

+73
-25
lines changed

6 files changed

+73
-25
lines changed

build-tools/.gn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,7 @@ default_args = {
9696
use_relative_vtables_abi = false
9797

9898
icu_use_data_file = false
99+
100+
# requires rust toolchain
101+
v8_enable_temporal_support = false
99102
}

build-tools/deps_get.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
import json
5+
6+
def main():
7+
with open(sys.argv[1], 'r') as f:
8+
lookup = json.load(f)
9+
entry = lookup[sys.argv[2]];
10+
if isinstance(entry, str):
11+
print(entry)
12+
else:
13+
print(entry["url"])
14+
15+
if __name__ == "__main__":
16+
main()

build-tools/deps_parse.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
import json
5+
6+
def Var(arg):
7+
if arg == 'chromium_url':
8+
return 'https://chromium.googlesource.com'
9+
return '@' + arg
10+
11+
def Str(arg):
12+
return '@' + arg
13+
14+
def main():
15+
with open(sys.argv[1], 'r') as f:
16+
content = f.read()
17+
18+
out = {}
19+
exec(content, globals(), out)
20+
print(json.dumps(out['deps']))
21+
22+
if __name__ == "__main__":
23+
main()

build-tools/get_v8.sh

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ set -o errtrace # inherits trap on ERR in function and subshell
55

66
source utils.sh
77

8-
REVISION=13.6.233.8
8+
REVISION=14.0.365.4
99

1010
cloneDep() {
1111
if [ -d "${2}" ]; then
1212
warn "dependency ${2} already exists, skipping"
1313
else
14+
dep_info=$(python3 deps_get.py deps.json "${1}")
15+
IFS=@ read -r dep_path dep_commit <<< "${dep_info}"
16+
1417
say "cloning dependency ${1}"
15-
git clone --depth=1 "${1}" "${2}"
18+
git clone --depth=1 "${dep_path}" "${2}"
1619
pushd "${2}"
17-
git fetch --depth=1 origin $3
18-
git -c advice.detachedHead=false checkout $3
19-
git branch -D \@{-1} || true # if you want to tidy up the fetched branch
20+
git fetch --depth=1 origin ${dep_commit}
21+
git -c advice.detachedHead=false checkout ${dep_commit}
22+
git branch -D \@{-1} || true
2023
popd
2124
fi
2225
}
@@ -28,23 +31,25 @@ else
2831
git clone --depth=1 --branch ${REVISION} "https://chromium.googlesource.com/v8/v8.git" src
2932
fi
3033

31-
# TODO: we should generate this from src/DEPS
32-
cloneDep 'https://chromium.googlesource.com/chromium/src/build.git' 'src/build' '451ef881d77fff0b7a8bbfa61934f5e4a35b4c96'
33-
cloneDep 'https://chromium.googlesource.com/chromium/src/third_party/jinja2.git' 'src/third_party/jinja2' '5e1ee241ab04b38889f8d517f2da8b3df7cfbd9a'
34-
cloneDep 'https://chromium.googlesource.com/chromium/src/buildtools.git' 'src/buildtools' '6f359296daa889aa726f3d05046b9f37be241169'
35-
cloneDep 'https://chromium.googlesource.com/chromium/src/tools/clang.git' 'src/tools/clang' '0078c27c43cae91e96bb28d8a4407045966e0542'
36-
cloneDep 'https://chromium.googlesource.com/chromium/src/third_party/zlib.git' 'src/third_party/zlib' '788cb3c270e8700b425c7bdca1f9ce6b0c1400a9'
37-
cloneDep 'https://chromium.googlesource.com/external/github.com/google/googletest.git' 'src/third_party/googletest/src' '52204f78f94d7512df1f0f3bea1d47437a2c3a58'
38-
cloneDep 'https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git' 'src/third_party/markupsafe' '9f8efc8637f847ab1ba984212598e6fb9cf1b3d4'
39-
cloneDep 'https://chromium.googlesource.com/chromium/deps/icu.git' 'src/third_party/icu' 'c9fb4b3a6fb54aa8c20a03bbcaa0a4a985ffd34b'
40-
cloneDep 'https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git' 'src/third_party/abseil-cpp' '3fbb10e80d80e3430224b75add53c47c7a711612'
41-
cloneDep 'https://chromium.googlesource.com/chromium/src/third_party/simdutf.git' 'src/third_party/simdutf' '40d1fa26cd5ca221605c974e22c001ca2fb12fde'
42-
cloneDep 'https://chromium.googlesource.com/external/github.com/google/highway.git' 'src/third_party/highway/src/' '00fe003dac355b979f36157f9407c7c46448958e'
43-
cloneDep 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git' 'src/third_party/libc++/src' '449310fe2e37834a7e62972d2a690cade2ef596b'
44-
cloneDep 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git' 'src/third_party/libc++abi/src' '94c5d7a8edc09f0680aee57548c0b5d400c2840d'
45-
cloneDep 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libc.git' 'src/third_party/llvm-libc/src' '188329a7f2118a957efbb3e6219c255e7dba997c'
46-
cloneDep 'https://chromium.googlesource.com/external/github.com/Maratyszcza/FP16.git' 'src/third_party/fp16/src' '0a92994d729ff76a58f692d3028ca1b64b145d91'
47-
cloneDep 'https://chromium.googlesource.com/external/github.com/fastfloat/fast_float.git' 'src/third_party/fast_float/src' 'cb1d42aaa1e14b09e1452cfdef373d051b8c02a4'
34+
python3 deps_parse.py src/DEPS > deps.json
35+
36+
cloneDep 'build' 'src/build'
37+
cloneDep 'third_party/jinja2' 'src/third_party/jinja2'
38+
cloneDep 'buildtools' 'src/buildtools'
39+
cloneDep 'tools/clang' 'src/tools/clang'
40+
cloneDep 'third_party/zlib' 'src/third_party/zlib'
41+
cloneDep 'third_party/googletest/src' 'src/third_party/googletest/src'
42+
cloneDep 'third_party/markupsafe' 'src/third_party/markupsafe'
43+
cloneDep 'third_party/icu' 'src/third_party/icu'
44+
cloneDep 'third_party/abseil-cpp' 'src/third_party/abseil-cpp'
45+
cloneDep 'third_party/simdutf' 'src/third_party/simdutf'
46+
cloneDep 'third_party/highway/src' 'src/third_party/highway/src/'
47+
cloneDep 'third_party/libc++/src' 'src/third_party/libc++/src'
48+
cloneDep 'third_party/libc++abi/src' 'src/third_party/libc++abi/src'
49+
cloneDep 'third_party/llvm-libc/src' 'src/third_party/llvm-libc/src'
50+
cloneDep 'third_party/fp16/src' 'src/third_party/fp16/src'
51+
cloneDep 'third_party/fast_float/src' 'src/third_party/fast_float/src'
52+
cloneDep 'third_party/dragonbox/src' 'src/third_party/dragonbox/src'
4853

4954
# Add an empty gclient_args.gni so gn is happy. gclient also creates an empty file.
5055
echo "# generated by get_v8.sh" > src/build/config/gclient_args.gni

src/binding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,15 +1229,15 @@ const v8::Array* v8__Object__GetPropertyNames(
12291229

12301230
const v8::Value* v8__Object__GetPrototype(
12311231
const v8::Object& self) {
1232-
return local_to_ptr(ptr_to_local(&self)->GetPrototype());
1232+
return local_to_ptr(ptr_to_local(&self)->GetPrototypeV2());
12331233
}
12341234

12351235
void v8__Object__SetPrototype(
12361236
const v8::Object& self,
12371237
const v8::Context& ctx,
12381238
const v8::Object& prototype,
12391239
v8::Maybe<bool>* out) {
1240-
*out = ptr_to_local(&self)->SetPrototype(ptr_to_local(&ctx), ptr_to_local(&prototype));
1240+
*out = ptr_to_local(&self)->SetPrototypeV2(ptr_to_local(&ctx), ptr_to_local(&prototype));
12411241
}
12421242

12431243
void v8__Object__SetAlignedPointerInInternalField(

src/binding.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ typedef struct ResourceConstraints {
278278
usize max_young_generation_size_;
279279
usize initial_old_generation_size_;
280280
usize initial_young_generation_size_;
281+
uint64_t physical_memory_size_;
281282
uint32_t* stack_limit_;
282283
} ResourceConstraints;
283284

@@ -297,7 +298,7 @@ typedef struct CreateParams {
297298
int embedder_wrapper_object_index;
298299
void* fatal_error_callback;
299300
void* oom_error_callback;
300-
void* heap;
301+
void* cpp_heap;
301302
} CreateParams;
302303
usize v8__Isolate__CreateParams__SIZEOF();
303304
void v8__Isolate__CreateParams__CONSTRUCT(CreateParams* buf);

0 commit comments

Comments
 (0)