v2 / vlib / v / fmt / tests / conditional_compilation_keep.vv
19 lines · 19 sloc · 446 bytes · 35f56bc4f0a2cf635deee8a5249b9b6c8d13d115
Raw
1// __global g_my_global_variable int
2fn main() {
3 $if tinyc {
4 println('This will be compiled only when the compiler is tcc')
5 }
6 $if !windows {
7 println('This will get compiled on non-windows platforms.')
8 }
9 //
10 $if !linux {
11 println('Only non linux platforms will get this')
12 } $else {
13 println('This part is for linux only.')
14 }
15 //
16 $if network ? {
17 println('This will be run, only when the program is compiled with `-d network`')
18 }
19}
20