File tree Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 1
- 1 . Get ` zstd ` from https://github.com/facebook/zstd/releases
2
- 2 . Download and extract ` zstd ` , and goto ` zstd-1.5.7/build/single_file_libs/ ` , run ` create_single_file_library.sh `
3
- 3 . Copy generated ` zstd.c ` to v's ` thirdparty/zstd/zstd-1.5.7.c `
4
- 4 . In ` thirdparty/zstd/ ` , apply patch by ` patch -p0 -i zstd_v.patch -o zstd.c `
5
- 5 . Remove ` zstd-1.5.7.c `
1
+ The changes here are produced by modifying ` thirdparty/zstd/zstd_v.patch ` ,
2
+ and then running ` v thirdparty/zstd/update.vsh ` .
6
3
7
- You can generate a new patch by ` diff -u zstd-1.5.7.c zstd_modified.c > zstd_custom.patch `
4
+ You can generate a new patch by:
5
+ ` diff -u zstd-1.5.7/build/single_file_libs/zstd.c thirdparty/zstd/zstd.c > zstd_custom.patch `
8
6
9
7
BTW, patch is between ` /* >> v_patch start */ ` and ` /* << v_patch end */ ` mostly.
Original file line number Diff line number Diff line change
1
+ // Use this script to update thirdparty/zstd to a future version of mbedtls.
2
+ import os
3
+
4
+ fn do (cmd string) {
5
+ println(cmd)
6
+ res : = os.system(cmd)
7
+ if res != 0 {
8
+ panic('failed at: `${cmd}`')
9
+ }
10
+ }
11
+
12
+ os.chdir(os.dir(@VEXE))!
13
+
14
+ version : = '1.5 .7 '
15
+ do ('rm - rf zstd- ${version}* ')
16
+ do ('wget https: // github.com/facebook/zstd/releases/download/v${version}/zstd-${version}.tar.gz')
17
+ do ('tar - xf zstd- ${version}.tar.gz')
18
+ do ('pushd .; cd zstd- ${version}/ build/ single_file_libs/ ; ./create_single_file_library.sh; popd')
19
+ do ('cp zstd- ${version}/ build/ single_file_libs/ zstd.c thirdparty/ zstd/ zstd.c')
20
+ do ('pushd .; cd thirdparty/ zstd/ ; patch -- verbose -- unified - p0 -- input zstd_v.patch ; popd')
21
+ do ('rm - rf zstd- ${version}* ')
22
+ println('DONE')
Original file line number Diff line number Diff line change 1
- --- zstd-1.5.7 .c 2025-05-30 16:39:46.374765970 +0800
1
+ --- zstd.c 2025-05-30 16:39:46.374765970 +0800
2
2
+++ zstd.c 2025-05-30 21:02:30.710831777 +0800
3
3
@@ -50,6 +50,27 @@
4
4
/* TODO: Can't amalgamate ASM function */
You can’t perform that action at this time.
0 commit comments