evo-lua / evo-luvi

[Obsolete] Experimental Lua runtime environment built on Luvi (libuv + LuaJIT)
https://evo-lua.github.io
Apache License 2.0
1 stars 0 forks source link

Integrate the build process for dependencies with that of the runtime #163

Open Duckwhale opened 1 year ago

Duckwhale commented 1 year ago

Goals:

The detection heuristic of "build config changed = need to rebuild" may be a bit sketchy, especially since Ninja sometimes mis-detects this. It would be a huge PITA if, say, OpenSSL was erroneously rebuilt because that takes forever. If this turns out to be a huge issue, just drop the second part and only build them once (to ease bootstrapping)...

Duckwhale commented 1 year ago

Initial POC:

OS_BUILD_SUFFIX = unixbuild
BUILD_DIR = ninjabuild-unix

rule make_external_project
  command = deps/$library_name\-$OS_BUILD_SUFFIX.sh
  description = Building external project $library_name  ...

rule generate_cdefs
  command = deps/generate-cdefs.sh
  description = Generating FFI cdefs for $out ...

build $BUILD_DIR/libluajit.a: make_external_project deps/luv/deps/luajit/Makefile
  library_name = luajit

build $BUILD_DIR/libllhttp.a: make_external_project deps/llhttp/CMakeLists.txt
  library_name = llhttp

build deps/llhttp_cdefs.h: generate_cdefs deps/cparser/lcpp

#TODO dupdate ependency graph