From e0a950a484da0c8c62d93409d77dc08a3b796df3 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Thu, 12 Sep 2024 13:02:03 -0500 Subject: Add a meta step to build the linux binaries --- init | 3 ++- init-nix | 8 ++++++++ meta.lua | 16 +++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 init-nix diff --git a/init b/init index c57fe55..126db12 100755 --- a/init +++ b/init @@ -1,7 +1,8 @@ #!/bin/sh -ex +echo "lua4win" > luajit_relver.txt cd "luajit" -make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" +make "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" BUILDMODE=mixed cd "/root/" cp luajit/src/*.exe . cp luajit/src/*.dll . diff --git a/init-nix b/init-nix new file mode 100644 index 0000000..afdf99d --- /dev/null +++ b/init-nix @@ -0,0 +1,8 @@ +#!/bin/sh + +rc-service networking start + +apk add build-base +cd luajit/src +echo "lua4win" > luajit_relver.txt +make host/minilua host/buildvm diff --git a/meta.lua b/meta.lua index e71a077..1b74bf6 100644 --- a/meta.lua +++ b/meta.lua @@ -12,8 +12,20 @@ local debug = { debug = "-g", } local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} - local builds = {} + +--2-part build since we need to compile some binaries for use during the rest of the build +builds["luajit-meta"] = { + requires = { + {"git","luajit"} + }, + produces = { + ["luajit/src/host/minilua"] = true, + ["luajit/src/host/buildvm"] = true + }, + entrypoint="init-nix" +} + for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, compilers) do local name = "luajit-" .. name .. "-" .. rel .. "-" .. image builds[name] = { @@ -21,6 +33,8 @@ for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, c requires = { {"git","luajit"}, {"cicd", "image-" .. image}, + {"cicd", "luajit-base:luajit/src/host/minilua"}, + {"cicd", "luajit-base:luajit/src/host/buildvm"}, }, produces = { ["lua.exe"] = true, -- cgit v1.2.3-55-g6feb