From a08954569f197312db4d6b217f1b8ba3441fc078 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Mon, 25 Mar 2024 10:08:21 -0400 Subject: [ruby/prism] Fix up minimal build setting https://github.com/ruby/prism/commit/98c85c4acb --- prism/defines.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'prism/defines.h') diff --git a/prism/defines.h b/prism/defines.h index aca3c6dc08..2fe73fe3d8 100644 --- a/prism/defines.h +++ b/prism/defines.h @@ -182,4 +182,25 @@ #endif #endif +/** + * If PRISM_BUILD_MINIMAL is defined, then we're going to define every possible + * switch that will turn off certain features of prism. + */ +#ifdef PRISM_BUILD_MINIMAL + /** Exclude the serialization API. */ + #define PRISM_EXCLUDE_SERIALIZATION + + /** Exclude the JSON serialization API. */ + #define PRISM_EXCLUDE_JSON + + /** Exclude the Array#pack parser API. */ + #define PRISM_EXCLUDE_PACK + + /** Exclude the prettyprint API. */ + #define PRISM_EXCLUDE_PRETTYPRINT + + /** Exclude the full set of encodings, using the minimal only. */ + #define PRISM_ENCODING_EXCLUDE_FULL +#endif + #endif -- cgit v1.2.3