Skip to content

Instantly share code, notes, and snippets.

@gerdr
Last active December 20, 2015 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerdr/6184541 to your computer and use it in GitHub Desktop.
Save gerdr/6184541 to your computer and use it in GitHub Desktop.
MoarVM configuration refactor

The current build system is too restrictive. I did an ad-hoc fix to get my setup to work, but a proper solution should respect the following configuration options:

host os --os

win32 vs posix

determines things like binary suffix or which libraries need to be linked (-lm -lpthread vs -lws2_32 -lmswsock ...)

build shell --shell

win32 vs posix

determines the available build tools like cat vs type, rm vs del

build toolchain --toolchain

gnu vs msvc

determines how arguments are passed to the compiler/linker and make vs nmake

this does not necessarily mean that the actual toolchain is used (the LLVM guys are working on their own linker right now) - it's about the argument format (gcc compatible vs cl/link compatible)

compiler --cc

we keep a list of supported compilers so we can add proper warning and instrumentation options

the main use case would be clang support

build and host triples --build, --host

i686-pc-cygwin, x86_64-w64-mingw32, ...

the host triple is used as prefix in case of gcc and if no compiler is chosen explicitly

they need to be passed to 3rdparty configure scripts

@diakopter
Copy link

+1

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