1.1--- a/makefile Fri Dec 29 21:10:24 2023 -0500
1.2+++ b/makefile Sat Dec 30 02:19:39 2023 -0500
1.3@@ -14,10 +14,6 @@
1.4
1.5 VERSION="0.1.0"
1.6 LINUX_VERSION:=$(shell uname -r | cut -d- -f1)
1.7-EMACS_VERSION:=main
1.8-ROCKSDB_VERSION:=main
1.9-SBCL_VERSION:=main
1.10-RUST_VERSION:=main
1.11 B:=build
1.12 D:=dist
1.13 SRC:=comp
1.14@@ -43,36 +39,40 @@
1.15 clean-linux::;rm -rf build/$(LINUX_TARGET)
1.16
1.17 ### Emacs
1.18-EMACS_TARGET:=build/src/emacs-$(EMACS_VERSION)
1.19+EMACS_TARGET:=build/src/emacs
1.20 EMACS_DIST:=$(D)/src/emacs
1.21 $(EMACS_TARGET):scripts/get-emacs.sh $(B);
1.22- $< $(EMACS_VERSION)
1.23+ $<
1.24 emacs:$(EMACS_TARGET)
1.25 emacs-build:emacs scripts/build-emacs.sh;
1.26 cd $(EMACS_TARGET) && ./autogen.sh
1.27- scripts/build-emacs.sh $(EMACS_VERSION) $(EMACS_TARGET)
1.28+ scripts/build-emacs.sh $(EMACS_TARGET)
1.29 emacs-install:emacs-build;
1.30 cd $(EMACS_TARGET) && make install
1.31
1.32 ### RocksDB
1.33 ROCKSDB_TARGET:=build/src/rocksdb
1.34-rocksdb:scripts/get-rocksdb.sh;
1.35+$(ROCKSDB_TARGET):scripts/get-rocksdb.sh $(B);
1.36 $<
1.37 cd $(ROCKSDB_TARGET) && \
1.38 make shared_lib DISABLE_JEMALLOC=1
1.39+rocksdb:$(ROCKSDB_TARGET)
1.40
1.41+rocksdb-install:$(ROCKSDB_TARGET)
1.42+ cd $< && cp -rf $(ROCKSDB_TARGET)/include/* /usr/local/include/ && \
1.43+ cp -f $(ROCKSDB_TARGET)/librocksdb.so* /usr/local/include/
1.44 ### SBCL
1.45 SBCL_TARGET:=build/src/sbcl
1.46 $(SBCL_TARGET):scripts/get-sbcl.sh $(B);
1.47 $<
1.48 cd $(SBCL_TARGET) && \
1.49- echo '"2.3.12+main"' > version.lisp-expr && \
1.50+ echo '"2.4.1+main"' > version.lisp-expr && \
1.51 sh make.sh \
1.52 --without-gencgc \
1.53 --with-mark-region-gc \
1.54 --with-core-compression \
1.55 --with-sb-xref-for-internals \
1.56- --dynamic-space-size=4Gb \
1.57+ --dynamic-space-size=8Gb \
1.58 --fancy && \
1.59 cd doc/manual && make
1.60 sbcl:$(SBCL_TARGET)
1.61@@ -80,9 +80,9 @@
1.62 clean-sbcl:$(SBCL_TARGET);cd $(SBCL_TARGET) && ./clean.sh
1.63
1.64 ### Rust
1.65-RUST_TARGET:=build/src/rust-$(RUST_VERSION)
1.66+RUST_TARGET:=build/src/rust
1.67 rust:scripts/get-rust.sh $(B);
1.68- $< $(RUST_VERSION)
1.69+ $<
1.70 rust-x:rust;
1.71 cargo install --path $(RUST_TARGET)/src/tools/x
1.72 rust-build:rust rust-install-x;
1.73@@ -144,9 +144,9 @@
1.74 dist/linux:linux $(D);
1.75
1.76 dist/rocksdb:rocksdb $(D);
1.77- cd $(ROCKSDB_TARGET)
1.78- cp -rf include/* $(D)
1.79- cp -f librocksdb.so* $(D)/lib/
1.80+ mkdir -pv $@
1.81+ cp -rf $(ROCKSDB_TARGET)/include/* $@
1.82+ cp -f $(ROCKSDB_TARGET)/librocksdb.so* $@
1.83
1.84 dist/rust:rust-build $(D);
1.85 cd $(RUST_TARGET) && x dist
1.86@@ -158,11 +158,6 @@
1.87 $< "$@/std.core"
1.88 $< "$@/prelude.core" "(mapc #'ql:quickload \
1.89 (list :nlp :rdb :organ :packy :skel :obj :net :parse :pod :dat :log :packy :rt :syn :xdb))"
1.90- $< "$@/rdb.core" "(ql:quickload :rdb)"
1.91- $< "$@/organ.core" "(ql:quickload :organ)"
1.92- $< "$@/skel.core" "(ql:quickload :skel)"
1.93- $< "$@/pod.core" "(ql:quickload :pod)"
1.94- $< "$@/cli.core" "(ql:quickload :cli)"
1.95
1.96 dist/comp:comp
1.97 mkdir -pv $@
2.1--- a/scripts/build-emacs.sh Fri Dec 29 21:10:24 2023 -0500
2.2+++ b/scripts/build-emacs.sh Sat Dec 30 02:19:39 2023 -0500
2.3@@ -1,7 +1,6 @@
2.4 #!/usr/bin/env bash
2.5 CPUS=$(getconf _NPROCESSORS_ONLN)
2.6-VER="${1:-main}"
2.7-TARGETDIR=${2:-$(realpath build/src/emacs-$VER)}
2.8+TARGETDIR=${1:-$(realpath build/src/emacs)}
2.9 CONFIG=(--with-mailutils
2.10 --with-imagemagick
2.11 --with-x-toolkit=gtk
3.1--- a/scripts/check.lisp Fri Dec 29 21:10:24 2023 -0500
3.2+++ b/scripts/check.lisp Sat Dec 30 02:19:39 2023 -0500
3.3@@ -4,10 +4,6 @@
3.4 ;; bootstrapping.
3.5
3.6 ;;; Code:
3.7-#+quicklisp
3.8-(mapc (lambda (x) (unless (find-package x) (ql:quickload x)))
3.9- '(:cli :std :sb-alien :cli :log))
3.10-
3.11 (defpackage :infra/scripts/check
3.12 (:nicknames :check)
3.13 (:use :cl :std :sb-alien :cli :log)
4.1--- a/scripts/get-cargo-tools.sh Fri Dec 29 21:10:24 2023 -0500
4.2+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3@@ -1,10 +0,0 @@
4.4-#!/bin/sh
4.5-cargo install carg-add
4.6-cargo install cbindgen
4.7-cargo install cargo-asm
4.8-cargo install t-rec
4.9-cargo install trunk
4.10-cargo install tokio-console
4.11-cargo install sqlx-cli
4.12-cargo install wasm-bindgen-cli
4.13-cargo install wasm-opt
5.1--- a/scripts/get-cl.sh Fri Dec 29 21:10:24 2023 -0500
5.2+++ b/scripts/get-cl.sh Sat Dec 30 02:19:39 2023 -0500
5.3@@ -1,6 +1,5 @@
5.4 #!/usr/bin/bash
5.5-VER="${1:-main}"
5.6-TARGETDIR=${2:-$(realpath build/cl-$VER)}
5.7+TARGETDIR=${1:-$(realpath build/cl)}
5.8 hg clone https://vc.compiler.company/cl $TARGETDIR
5.9 pushd $TARGETDIR
5.10 make
6.1--- a/scripts/get-emacs.sh Fri Dec 29 21:10:24 2023 -0500
6.2+++ b/scripts/get-emacs.sh Sat Dec 30 02:19:39 2023 -0500
6.3@@ -1,5 +1,4 @@
6.4 #!/usr/bin/bash
6.5 # get Emacs source code
6.6-VER="${1:-main}"
6.7-TARGETDIR=${2:-$(realpath build/src/emacs-$VER)}
6.8+TARGETDIR=${1:-$(realpath build/src/emacs)}
6.9 git clone https://vc.compiler.company/packy/shed/vendor/emacs.git $TARGETDIR
7.1--- a/scripts/get-lust.sh Fri Dec 29 21:10:24 2023 -0500
7.2+++ b/scripts/get-lust.sh Sat Dec 30 02:19:39 2023 -0500
7.3@@ -1,7 +1,6 @@
7.4 #!/usr/bin/bash
7.5 # install the Lonely Rust compiler source code
7.6-VER="${1:-main}"
7.7-TARGETDIR=${2:-$(realpath build/lust-$VER)}
7.8+TARGETDIR=${1:-$(realpath build/lust)}
7.9 hg clone https://vc.compiler.company/lust $TARGETDIR
7.10 pushd $TARGETDIR
7.11 make
8.1--- a/scripts/get-rust.sh Fri Dec 29 21:10:24 2023 -0500
8.2+++ b/scripts/get-rust.sh Sat Dec 30 02:19:39 2023 -0500
8.3@@ -8,6 +8,5 @@
8.4 #rustup update
8.5 #rustup default nightly
8.6
8.7-VER="${1:-main}"
8.8-TARGETDIR=${2:-$(realpath build/src/rust-$VER)}
8.9+TARGETDIR=${1:-$(realpath build/src/rust)}
8.10 git clone https://vc.compiler.company/packy/shed/vendor/rust.git $TARGETDIR
9.1--- a/scripts/get-sbcl.sh Fri Dec 29 21:10:24 2023 -0500
9.2+++ b/scripts/get-sbcl.sh Sat Dec 30 02:19:39 2023 -0500
9.3@@ -1,5 +1,4 @@
9.4 #!/usr/bin/env bash
9.5 # get SBCL source code
9.6-VER="${1:-main}"
9.7-TARGETDIR=${2:-$(realpath build/src/sbcl)}
9.8+TARGETDIR=${1:-$(realpath build/src/sbcl)}
9.9 git clone https://vc.compiler.company/packy/shed/vendor/sbcl.git $TARGETDIR
10.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2+++ b/scripts/install-cargo-tools.sh Sat Dec 30 02:19:39 2023 -0500
10.3@@ -0,0 +1,10 @@
10.4+#!/bin/sh
10.5+cargo install carg-add
10.6+cargo install cbindgen
10.7+cargo install cargo-asm
10.8+cargo install t-rec
10.9+cargo install trunk
10.10+cargo install tokio-console
10.11+cargo install sqlx-cli
10.12+cargo install wasm-bindgen-cli
10.13+cargo install wasm-opt
11.1--- a/scripts/ts-install-langs.sh Fri Dec 29 21:10:24 2023 -0500
11.2+++ b/scripts/ts-install-langs.sh Sat Dec 30 02:19:39 2023 -0500
11.3@@ -40,14 +40,14 @@
11.4 if test -f "scanner.cc"; then
11.5 ${CXX} -I. -fPIC scanner.cc -c -lstdc++;
11.6 ${CC} -I. -std=c99 -fPIC parser.c -c;
11.7- ${CXX} -shared scanner.o parser.o -o ${PREFIX}/lib/tree-sitter-"${lang//\//-}.${EXT}";
11.8+ ${CXX} -shared scanner.o parser.o -o ${PREFIX}/lib/libtree-sitter-"${lang//\//-}.${EXT}";
11.9 elif test -f "scanner.c"; then
11.10 ${CC} -I. -std=c99 -fPIC scanner.c -c;
11.11 ${CC} -I. -std=c99 -fPIC parser.c -c;
11.12- ${CC} -shared scanner.o parser.o -o ${PREFIX}/lib/tree-sitter-"${lang//\//-}.${EXT}";
11.13+ ${CC} -shared scanner.o parser.o -o ${PREFIX}/lib/libtree-sitter-"${lang//\//-}.${EXT}";
11.14 else
11.15 ${CC} -I. -std=c99 -fPIC parser.c -c;
11.16- ${CC} -shared parser.o -o ${PREFIX}/lib/tree-sitter-"${lang//\//-}.${EXT}";
11.17+ ${CC} -shared parser.o -o ${PREFIX}/lib/libtree-sitter-"${lang//\//-}.${EXT}";
11.18 fi;
11.19 mkdir -p "${PREFIX}/share/tree-sitter/${lang}/";
11.20 cp grammar.json node-types.json "${PREFIX}/share/tree-sitter/${lang}";
13.1--- a/virt/build-box-base.sh Fri Dec 29 21:10:24 2023 -0500
13.2+++ b/virt/build-box-base.sh Sat Dec 30 02:19:39 2023 -0500
13.3@@ -1,4 +1,4 @@
13.4-#!/usr/bin/bash
13.5+#!/usr/bin/env bash
13.6 id=$(buildah from archlinux-base)
13.7 # buildah add $id /mnt/y/lab /var/local/lab
13.8 buildah run $id useradd -ms /bin/bash $USER
14.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2+++ b/virt/build-demo.sh Sat Dec 30 02:19:39 2023 -0500
14.3@@ -0,0 +1,12 @@
14.4+#!/usr/bin/env bash
14.5+id=$(buildah from archlinux-base)
14.6+buildah run $id useradd -ms /bin/bash $USER
14.7+buildah run $id mkdir -p /home/$USER/lab /var/local/data
14.8+buildah run --net host $id pacman -Syu make git zstd curl sbcl base-devel llvm --noconfirm
14.9+buildah run --net host $id hg clone https://vc.compiler.company/comp/core /usr/src/core
14.10+buildah run --net host $id hg clone https://vc.compiler.company/comp/infra /usr/src/infra
14.11+buildah run --net host $id hg clone https://vc.compiler.company/comp/demo /usr/src/demo
14.12+buildah run --net host $id /bin/sh -c 'cd /usr/src/infra && make sbcl-install && make rocksdb-install && make ts-langs && make dist/fasl'
14.13+buildah run $id cp /usr/src/infra/dist/fasl/* /usr/local/lib/sbcl/
14.14+buildah config --workingdir /home/$USER $id
14.15+buildah commit $id demo