From 09f1eb9ad2e0dfe39628c6ee4ff1b2bded3a871e Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 12 Aug 2022 05:10:39 +0300 Subject: [PATCH] doc: make if debug a bit more clear --- doc/docs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/docs.md b/doc/docs.md index 3b9326d391..a81ed934a4 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -5359,7 +5359,8 @@ fn main() { If you want an `if` to be evaluated at compile time it must be prefixed with a `$` sign. Right now it can be used to detect an OS, compiler, platform or compilation options. -`$if debug` is a special option like `$if windows` or `$if x32`. +`$if debug` is a special option like `$if windows` or `$if x32`, it's enabled if the program +is compiled with `v -g` or `v -cg`. If you're using a custom ifdef, then you do need `$if option ? {}` and compile with`v -d option`. Full list of builtin options: | OS | Compilers | Platforms | Other |