Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
rdw-software opened this issue Dec 22, 2022 · 1 comment
Open
2 tasks

Comments

@rdw-software
Copy link
Member

Goals:

  • Can build the dependencies by running the regular build script if they haven't been built yet
  • Running the build script automatically rebuilds the dependencies again if any of their build scripts (Makefile, CMakeLists.txt, ...) has changed

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)...

@rdw-software
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant