diff --git a/docs/build_system.md b/docs/build_system.md index 1dee3d7e45949e..e2c1d2b0a336c2 100644 --- a/docs/build_system.md +++ b/docs/build_system.md @@ -2,6 +2,17 @@ There are many ways to build YARP, which means the build system is a bit more complicated than usual. +## Requirements + +* It must work to build YARP for all 6 uses-cases below. +* It must be possible to build YARP without needing ruby/rake/etc. + Because once YARP is the single parser in TruffleRuby, JRuby or CRuby there won't be another Ruby parser around to parse such Ruby code. + Most/every Ruby implementations want to avoid depending on another Ruby during the build process as that is very brittle. +* It is desirable to compile YARP with the same or very similar compiler flags for all use-cases (e.g. optimization level, warning flags, etc). + Otherwise, there is the risk YARP does not work correctly with those different compiler flags. + +The main solution for the second point seems a Makefile, otherwise many of the usages would have to duplicate the logic to build YARP. + ## General Design 1. Templates are generated by `templates/template.rb`