From bf001243b759725f5e71ac5a18cad8595162af67 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Thu, 12 Sep 2024 11:59:35 -0500 Subject: Start building luajit --- init | 11 +++++++++++ meta.lua | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/init b/init index 642d265..0739dee 100755 --- a/init +++ b/init @@ -1 +1,12 @@ #!/bin/sh -ex + +luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") +mkdir "$luaver" +tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 +cd "$luaver" +make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" +cd "/root/" +cp $luaver/src/*.exe . +cp $luaver/src/*.dll . +cp $luaver/src/*.a . + diff --git a/meta.lua b/meta.lua index 71e1e14..e71a077 100644 --- a/meta.lua +++ b/meta.lua @@ -1,6 +1,36 @@ -return { - ["luajit"] = { - requires = {}, - produces = {}, - } +local optimizations = { + tiny = "-Oz", + size = "-Os", + debug = "-Og", + zero = "-O0", + one = "-O1", + two = "-O2", + three = "-O3", +} +local debug = { + release = "", + debug = "-g", } +local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} + +local builds = {} +for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, compilers) do + local name = "luajit-" .. name .. "-" .. rel .. "-" .. image + builds[name] = { + image = "image-" .. image, + requires = { + {"git","luajit"}, + {"cicd", "image-" .. image}, + }, + produces = { + ["lua.exe"] = true, + ["lua51.dll"] = true, + ["liblua.a"] = true, + ["luac.exe"] = true, + }, + env = { + CFLAGS = optimization .. " " .. flag, + }, + } +end +return builds -- cgit v1.2.3-55-g6feb