Skip to content

Commit a7fc486

Browse files
authored
[skiplang] Update to LLVM 20. (#942)
2 parents d436c03 + d61a09b commit a7fc486

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

INSTALL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
You will need at least the following installed:
88

9-
* LLVM 15.
10-
* wasm-ld 15 (this is part of LLVM, but your distribution might split it into
9+
* LLVM 20.
10+
* wasm-ld 20 (this is part of LLVM, but your distribution might split it into
1111
a separate package: your wasm-ld version must match your LLVM version).
1212
* typescript 5.7 or later.
1313

bin/apt-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
default_steps=(skiplang-build-deps skipruntime-deps)
6-
LLVM_VERSION=15
6+
LLVM_VERSION=20
77
PRIORITY=101
88

99
usage() {

skiplang/compiler/src/compile.sk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ fun runShell(args: Array<String>, verbose: Bool = false): void {
173173
}
174174

175175
fun ensureCompatibleLLVMVersion(): void {
176-
kLLVMVersion = "15.";
176+
kLLVMVersion = "20.";
177177

178178
p = System.subprocess(Array["llvm-config", "--version"]).fromSuccess();
179179
if (!p.success()) {
180180
print_error_raw(p.stderr);
181181
skipExit(1)
182182
} else if (!p.stdout.startsWith(kLLVMVersion)) {
183183
print_error(
184-
`Incompatible llvm version ${p.stdout}, expected LLVM ${kLLVMVersion}`,
184+
`Incompatible LLVM version ${p.stdout.trimRight()}, expected LLVM ${kLLVMVersion}`,
185185
);
186186
skipExit(1)
187187
}

skiplang/prelude/runtime/runtime64_specific.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -285,26 +285,6 @@ void sk_init(int pargc, char** pargv) {
285285
SKIP_destroy_Obstack(saved);
286286
}
287287

288-
#ifdef SKIP_LIBRARY
289-
__attribute__((constructor)) static void lib_init() {
290-
argc = 1;
291-
char* argv0 = strdup("library");
292-
argv = (char**)malloc(2 * sizeof(char*));
293-
argv[0] = argv0;
294-
argv[1] = NULL;
295-
sk_init(argc, argv);
296-
}
297-
#else
298-
int main(int pargc, char** pargv) {
299-
std::set_terminate(terminate);
300-
// TODO: Make memory initialization read state.db path from the environment
301-
// rather than command line arguments, and let the above constructor handle
302-
// it.
303-
sk_init(pargc, pargv);
304-
skip_main();
305-
}
306-
#endif // SKIP_LIBRARY
307-
308288
static void print(FILE* descr, char* str) {
309289
size_t size = SKIP_String_byteSize((char*)str);
310290
fwrite(str, size, 1, descr);
@@ -638,3 +618,23 @@ void SKIP_js_delete_fun() {
638618
// Not implemented
639619
}
640620
}
621+
622+
#ifdef SKIP_LIBRARY
623+
__attribute__((constructor)) static void lib_init() {
624+
argc = 1;
625+
char* argv0 = strdup("library");
626+
argv = (char**)malloc(2 * sizeof(char*));
627+
argv[0] = argv0;
628+
argv[1] = NULL;
629+
sk_init(argc, argv);
630+
}
631+
#else
632+
int main(int pargc, char** pargv) {
633+
std::set_terminate(terminate);
634+
// TODO: Make memory initialization read state.db path from the environment
635+
// rather than command line arguments, and let the above constructor handle
636+
// it.
637+
sk_init(pargc, pargv);
638+
skip_main();
639+
}
640+
#endif // SKIP_LIBRARY

0 commit comments

Comments
 (0)