build-info(3tcl)

πŸ“¦ version 9.0.4, in ubuntu questing, ubuntu resolute, ubuntu stonking

✨ build-info β€” the Tcl built-in that spills the tea on how Tcl was compiled ✨

okay so bestie, you ever look at your Tcl and go "hmm. what compiler raised you. what were the build flags. were you debug. are you even threaded." and no one can answer you? yeah. that's what this command is for. welcome to the build-info glow-up πŸ’…

This is a Tcl built-in command, living in the 3tcl manual section. Let's get into it.


🌸 SYNOPSIS 🌸

::tcl::build-info ?field?

πŸ’– DESCRIPTION πŸ’–

So like, this command is your lil backstage pass to how Tcl was actually built. It's giving "behind the scenes documentary" energy.

If you pass no options at all, it hands you back the Tcl patchlevel, then a '+'-sign, then the fossil commit-id, then a list of dot-separated tags. That's the whole vibe string, all in one go. 🫢

But if you do give it a field, it extracts just that one field, described down below. And here's the iconic part: any other field value that isn't mentioned below will always return "0". no cap. that's the rule.

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 where Tcl was built from. your Tcl's origin story, fr.
  • ::tcl::build-info compiledebug β€” returns 1 if Tcl is compiled with -DTCL_COMPILE_DEBUG, 0 otherwise.
  • ::tcl::build-info compiler β€” returns the compiler name (either clang, gcc, icc or msvc), followed by a dash and a (4-digit) version number. so like gcc-1204, you know the vibe.
  • ::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 the reverse, read it twice bestie 😭
  • ::tcl::build-info gcc β€” gives you the gcc version number (as 4 digits) if Tcl was compiled with gcc, 0 otherwise.
  • ::tcl::build-info icc β€” gives you the icc version number (as 4 digits) if Tcl was 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 was 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 β€” returns the Tcl patchlevel, same as info patchlevel. twins fr 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 β€” returns the Tcl version, same as info tclversion. also twins πŸ’œ
  • ::tcl::build-info zlib β€” gives you the zlib version number (as 4 digits) if zlib is built into Tcl, 0 otherwise.

🌈 EXAMPLES 🌈

These show the use of ::tcl::build-info. look at her go, she's iconic:

::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 πŸ‘‘

  • info(3tcl) β€” go read that one too bestie, they're besties for a reason

⭐ KEYWORDS ⭐

build-info


and that's the whole page, no cap πŸ’– this lil icon lives in the Tcl manual, version 9.0, dated as build-info(3tcl) β€” so if you ever forget where you read all this, that's your receipt 🧚✨ bye bestie, go check your compiler flags πŸŽ€

πŸ“¦ where this page comes from