summaryrefslogtreecommitdiff
path: root/prism/defines.h
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-03-25 10:08:21 -0400
committerKevin Newton <[email protected]>2024-03-25 11:54:20 -0400
commita08954569f197312db4d6b217f1b8ba3441fc078 (patch)
tree30a1cbad014d7b90e4e1a9963a0df3879867db96 /prism/defines.h
parent53cc2723877f7794807684e31a530daca1a72ed6 (diff)
[ruby/prism] Fix up minimal build setting
https://github.com/ruby/prism/commit/98c85c4acb
Diffstat (limited to 'prism/defines.h')
-rw-r--r--prism/defines.h21
1 files changed, 21 insertions, 0 deletions
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