build-info(n)

πŸ’– build-info(n) β€” the Tcl Built-In Commands glow-up πŸ’–

okay bestie, so this is one of the Tcl built-in commands and honestly? it's giving "backstage pass to your own build". no cap.


✨ NAME ✨

buildinfo β€” Build info πŸ› οΈ


🌸 SYNOPSIS 🌸

::tcl::build-info ?field?

πŸ’… DESCRIPTION πŸ’…

so basically, this command is your lil spy cam into how Tcl was built. like, the receipts. the lore. πŸ”

If you don't pass any options at all, it hands you the Tcl patchlevel, then a '+' sign, then the fossil commit-id, and then a list of dot-separated tags. all glued together. iconic behavior honestly.

But if you give it a field, it pulls out just that one field, exactly like described below. πŸ‘‡

🚨 important bestie: any other field value that isn't mentioned below will always return "0". no exceptions, no drama.

For official Tcl releases, the fields are:

  • ::tcl::build-info clang β€” gives you the clang version number (as 4 digits) if Tcl was compiled with clang, and 0 if it wasn't. πŸ’€
  • ::tcl::build-info commit β€” gives you the fossil commit-id that Tcl was built from. the origin story fr.
  • ::tcl::build-info compiledebug β€” returns 1 if Tcl is compiled with -DTCL_COMPILE_DEBUG, 0 otherwise.
  • ::tcl::build-info compiler β€” gives you the compiler name (either clang, gcc, icc or msvc), then a dash, then a (4-digit) version number. slay πŸ’…
  • ::tcl::build-info compilestats β€” returns 1 if Tcl is compiled with -DTCL_COMPILE_STATS, 0 otherwise.
  • ::tcl::build-info cplusplus β€” returns 1 if Tcl is compiled with a C++ compiler, 0 otherwise.
  • ::tcl::build-info debug β€” returns 1 if Tcl is not compiled with -DNDEBUG, 0 otherwise. (yes, it's a double negative, we don't make the rules πŸ™ˆ)
  • ::tcl::build-info gcc β€” gives you the gcc version number (as 4 digits) if Tcl is compiled with gcc, 0 otherwise.
  • ::tcl::build-info icc β€” gives you the icc version number (as 4 digits) if Tcl is compiled with icc, 0 otherwise.
  • ::tcl::build-info ilp32 β€” returns 1 if Tcl is compiled such that integers, longs and pointers are all 32-bit, 0 otherwise.
  • ::tcl::build-info memdebug β€” returns 1 if Tcl is compiled with -DTCL_MEM_DEBUG, 0 otherwise.
  • ::tcl::build-info msvc β€” gives you the msvc version number (as 4 digits) if Tcl is compiled with msvc, 0 otherwise.
  • ::tcl::build-info nmake β€” returns 1 if Tcl is built using nmake, 0 otherwise.
  • ::tcl::build-info no-deprecate β€” returns 1 if Tcl is compiled with -DTCL_NO_DEPRECATED, 0 otherwise.
  • ::tcl::build-info no-thread β€” returns 1 if Tcl is compiled with -DTCL_THREADS=0, 0 otherwise.
  • ::tcl::build-info no-optimize β€” returns 1 if Tcl is not compiled with -DTCL_CFG_OPTIMIZED, 0 otherwise.
  • ::tcl::build-info objective-c β€” returns 1 if Tcl is compiled with an objective-c compiler, 0 otherwise.
  • ::tcl::build-info objective-cplusplus β€” returns 1 if Tcl is compiled with an objective-c++ compiler, 0 otherwise.
  • ::tcl::build-info patchlevel β€” gives you the Tcl patchlevel, same as info patchlevel. twins fr.
  • ::tcl::build-info profile β€” returns 1 if Tcl is compiled with -DTCL_CFG_PROFILED, 0 otherwise.
  • ::tcl::build-info purify β€” returns 1 if Tcl is compiled with -DPURIFY, 0 otherwise.
  • ::tcl::build-info static β€” returns 1 if Tcl is compiled as a static library, 0 otherwise.
  • ::tcl::build-info tommath β€” gives you the libtommath version number (as 4 digits) if libtommath is built into Tcl, 0 otherwise.
  • ::tcl::build-info version β€” gives you the Tcl version, same as info tclversion.
  • ::tcl::build-info zlib β€” gives you the zlib version number (as 4 digits) if zlib is built into Tcl, 0 otherwise.

πŸ¦‹ EXAMPLES πŸ¦‹

here's ::tcl::build-info in its natural habitat, showing off πŸŽ€

::tcl::build-info
     β†’ 9.0.2+af16c07b81655fabde8028374161ad54b84ef9956843c63f49976b4ef601b611.gcc-1204
::tcl::build-info commit
     β†’ af16c07b81655fabde8028374161ad54b84ef9956843c63f49976b4ef601b611
::tcl::build-info compiler
     β†’ gcc-1204
::tcl::build-info gcc
     β†’ 1204
::tcl::build-info version
     β†’ 9.0
::tcl::build-info patchlevel
     β†’ 9.0.2

πŸ‘‘ SEE ALSO πŸ‘‘


⭐ KEYWORDS ⭐

  • build-info

and that's the whole page bestie, you ate that πŸ’…βœ¨ if you ever forget a field name just come back here, this page is literally your main character reference. mwah 🫢

Tcl 9.0 Β· build-info(n) Β· go off, build-info, you absolute icon πŸŒˆπŸ’–

πŸ“¦ where this page comes from