+
+# Return true if the current test is using Fil-C. False otherwise.
+#
+proc is_fil_cc {} {
+ set ret 0
+ if {[catch { exec $::env(CC) --version } msg]==0
+ && [string first Fil-C $msg]>=0
+ } {
+ set ret 1
+ }
+ return $ret
+}
+
+# Return the default value for the -nbuild switch. This value limits the
+# number of build jobs that may be run concurrently. Usually there is
+# no special limit for this, but with Fil-C the compiler has been observed
+# using up to 8GB of memory to build sqlite3.c, so in this case the default
+# limit is two concurrent builds.
+#
+proc default_nbuild {} {
+ set ret -1
+ if {$::TRG(fil-cc)} {
+ set ret 2
+ }
+ return $ret
+}
+