Skip to content

Commit 28a0f5f

Browse files
committed
fix most of the build issues on msys2
there is still an issue that msys2's node doesn't have full NAPI implementation, so swc fails.
1 parent 04626f1 commit 28a0f5f

2 files changed

Lines changed: 24 additions & 23 deletions

File tree

meta/ninja/programs.ninja.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ program(
2020
"yavascript",
2121
"x86_64-apple-darwin",
2222
"qjsbootstrap-bytecode",
23-
"dist/bytecode/index-x86_64.bin",
23+
builddir("bytecode/index-x86_64.bin"),
2424
);
2525
program(
2626
"yavascript",
2727
"x86_64-unknown-linux-static",
2828
"qjsbootstrap-bytecode",
29-
"dist/bytecode/index-x86_64.bin",
29+
builddir("bytecode/index-x86_64.bin"),
3030
);
3131
program(
3232
"yavascript",
3333
"x86_64-unknown-linux-gnu",
3434
"qjsbootstrap-bytecode",
35-
"dist/bytecode/index-x86_64.bin",
35+
builddir("bytecode/index-x86_64.bin"),
3636
);
3737
program(
3838
"yavascript",
3939
"x86_64-unknown-linux-musl",
4040
"qjsbootstrap-bytecode",
41-
"dist/bytecode/index-x86_64.bin",
41+
builddir("bytecode/index-x86_64.bin"),
4242
);
4343
program(
4444
"yavascript",
4545
"x86_64-unknown-freebsd-15",
4646
"qjsbootstrap-bytecode",
47-
"dist/bytecode/index-x86_64.bin",
47+
builddir("bytecode/index-x86_64.bin"),
4848
);
4949

5050
// bytecode stuff wasn't working properly on windows; endianness?
@@ -54,7 +54,7 @@ program(
5454
"yavascript",
5555
"x86_64-pc-windows-static",
5656
"qjsbootstrap.exe",
57-
"dist/bundles/index-x86_64.js",
57+
builddir("bundles/index-x86_64.js"),
5858
);
5959

6060
// --- aarch64 binaries ---
@@ -63,99 +63,99 @@ program(
6363
"yavascript",
6464
"aarch64-apple-darwin",
6565
"qjsbootstrap-bytecode",
66-
"dist/bytecode/index-arm64.bin",
66+
builddir("bytecode/index-arm64.bin"),
6767
);
6868
program(
6969
"yavascript",
7070
"aarch64-unknown-linux-static",
7171
"qjsbootstrap-bytecode",
72-
"dist/bytecode/index-arm64.bin",
72+
builddir("bytecode/index-arm64.bin"),
7373
);
7474
program(
7575
"yavascript",
7676
"aarch64-unknown-linux-gnu",
7777
"qjsbootstrap-bytecode",
78-
"dist/bytecode/index-arm64.bin",
78+
builddir("bytecode/index-arm64.bin"),
7979
);
8080
program(
8181
"yavascript",
8282
"aarch64-unknown-linux-musl",
8383
"qjsbootstrap-bytecode",
84-
"dist/bytecode/index-arm64.bin",
84+
builddir("bytecode/index-arm64.bin"),
8585
);
8686
program(
8787
"yavascript",
8888
"aarch64-unknown-freebsd-15",
8989
"qjsbootstrap-bytecode",
90-
"dist/bytecode/index-arm64.bin",
90+
builddir("bytecode/index-arm64.bin"),
9191
);
9292

9393
// --- yavascript-bootstrap ---
9494
program(
9595
"yavascript-bootstrap",
9696
"x86_64-apple-darwin",
9797
"qjsbootstrap",
98-
"dist/bundles/primordials-x86_64.js",
98+
builddir("bundles/primordials-x86_64.js"),
9999
);
100100
program(
101101
"yavascript-bootstrap",
102102
"x86_64-unknown-linux-static",
103103
"qjsbootstrap",
104-
"dist/bundles/primordials-x86_64.js",
104+
builddir("bundles/primordials-x86_64.js"),
105105
);
106106
program(
107107
"yavascript-bootstrap",
108108
"x86_64-unknown-linux-gnu",
109109
"qjsbootstrap",
110-
"dist/bundles/primordials-x86_64.js",
110+
builddir("bundles/primordials-x86_64.js"),
111111
);
112112
program(
113113
"yavascript-bootstrap",
114114
"x86_64-unknown-linux-musl",
115115
"qjsbootstrap",
116-
"dist/bundles/primordials-x86_64.js",
116+
builddir("bundles/primordials-x86_64.js"),
117117
);
118118
program(
119119
"yavascript-bootstrap",
120120
"x86_64-unknown-freebsd-15",
121121
"qjsbootstrap",
122-
"dist/bundles/primordials-x86_64.js",
122+
builddir("bundles/primordials-x86_64.js"),
123123
);
124124
program(
125125
"yavascript-bootstrap",
126126
"x86_64-pc-windows-static",
127127
"qjsbootstrap.exe",
128-
"dist/bundles/primordials-x86_64.js",
128+
builddir("bundles/primordials-x86_64.js"),
129129
);
130130
program(
131131
"yavascript-bootstrap",
132132
"aarch64-apple-darwin",
133133
"qjsbootstrap",
134-
"dist/bundles/primordials-arm64.js",
134+
builddir("bundles/primordials-arm64.js"),
135135
);
136136
program(
137137
"yavascript-bootstrap",
138138
"aarch64-unknown-linux-static",
139139
"qjsbootstrap",
140-
"dist/bundles/primordials-arm64.js",
140+
builddir("bundles/primordials-arm64.js"),
141141
);
142142
program(
143143
"yavascript-bootstrap",
144144
"aarch64-unknown-linux-gnu",
145145
"qjsbootstrap",
146-
"dist/bundles/primordials-arm64.js",
146+
builddir("bundles/primordials-arm64.js"),
147147
);
148148
program(
149149
"yavascript-bootstrap",
150150
"aarch64-unknown-linux-musl",
151151
"qjsbootstrap",
152-
"dist/bundles/primordials-arm64.js",
152+
builddir("bundles/primordials-arm64.js"),
153153
);
154154
program(
155155
"yavascript-bootstrap",
156156
"aarch64-unknown-freebsd-15",
157157
"qjsbootstrap",
158-
"dist/bundles/primordials-arm64.js",
158+
builddir("bundles/primordials-arm64.js"),
159159
);
160160

161161
const qjsPlatform = require("@suchipi/quickjs").identifyCurrentPlatform();

meta/scripts/ninja-build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ if [[ ! -e dist/yavascript.d.ts ]]; then
1313
touch dist/yavascript.d.ts
1414
fi
1515

16-
env BUILDDIR=dist npx --no-install shinobi \
16+
env BUILDDIR=dist MSYS2_ARG_CONV_EXCL='*' npx --no-install shinobi \
17+
--path-separator / \
1718
./meta/ninja/**/*.ninja.js \
1819
-o dist/build.ninja
1920

0 commit comments

Comments
 (0)