patscc(1)

πŸ’– patscc β€” the ATS2 compiler frontend, bestie edition πŸ’–

okay so real quick, this is page patscc(1) from the General Commands Manual section, and it's literally the glow-up guide to compiling ATS2. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

patscc β€” the ATS2 compiler frontend. that's her. that's the whole name. iconic behavior.


πŸ¦‹ SYNOPSIS πŸ¦‹

patscc [options] files...

options first, files after. the order is giving main character energy, and the files are the supporting cast.


🌸 DESCRIPTION 🌸

patscc is a frontend to the Postiats compiler patsopt for the ATS2 language. think of it as the social chair β€” it takes your vibes and relays them to the actual compiler. no cap. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

lowkey important lore: patscc has a command-line option syntax in the style of gcc and accepts all the same options, many of them being passed directly to the gcc backend. so if you already know gcc flags, you're set, bestie β€” no notes.

here's the summarized list of the non-gcc options:

  • -atsccomp <command> β€” specify the name of the C compiler on the command line. otherwise it'll use the environment variable ATSCCOMP, or just fall back to the default. see further details on environment variables below, iykyk.
  • -cleanaft β€” clean up incidental generated C files after compilation finishes. like wiping down the counter after you cook. tidy queen behavior 🧚
  • --compile, -ccats β€” only compile the given ATS source files into C files. that's it, that's the job. stop there, no further.
  • -DATS <name>[=<value>], -DDATS <name>[=<value>] β€” define a name/value macro toplevel value in ATS. -DDATS also passes this option to the C compiler. two birds, one flag πŸ¦‹
  • -IATS <path>, -IIATS <path> β€” add a path to search for ATS files when doing static and dynamic loads. -IIATS also passes this path to the C compiler.
  • -fsats <file>, -fdats <file> β€” these indicate that the following file is a SATS or a DATS file. totally unnecessary if you're using the standard filename extensions .sats or .dats tho, so don't stress.
  • --gline β€” place line pragma information based on ATS source in the generated C code. so your C knows where it came from. it's giving ancestry dot com πŸ”₯
  • --typecheck, -tcats β€” typecheck the given ATS source files, but go no further. just a lil vibe check. ✨
  • --version, -vats β€” show ATS2/Postiats version and gcc version. who are you, what are you made of, spill it.

🌈 ENVIRONMENT VARIABLES 🌈

  • PATSCCOMP, ATSCCOMP β€” use the value of this environment variable as the command name of the C compiler. the default is:
gcc -D_XOPEN_SOURCE -I${ATSHOME} -I${ATSHOME}/ccomp/runtime -L${ATSHOME}/ccomp/atslib/lib
  • PATSHOME, ATSHOME β€” use the value of this environment variable as the path to the ATS library installation. the default is distribution-specific. (so like… it depends, bestie, check your distro πŸ™ˆ)
  • PATSOPT, ATSOPT β€” use the value of this environment variable as the command name of the ATS compiler. the default is patsopt.

πŸŽ€ EXAMPLES πŸŽ€

the receipts. the proof. the slay.

patscc -o test -O3 test.dats

compile test.dats to an executable named test. and tell gcc to use the third level of optimization. level three!! we love a maximalist πŸ’…


patscc -tcats test.dats

typecheck test.dats only. no compiling, just checking. it's the vibe check of build steps.


patscc -ccats test.dats

compile to C file test_dats.c only. that's the whole output. one file, one moment.


patscc -o test.o -c test.dats -cleanaft

compile test.dats to an object file named test.o, and delete the intermediate C file. leaving no crumbs. πŸ‘‘


πŸ” SEE ALSO πŸ”

these programs are documented fully by The ATS2/Postiats user's manual, available via the web at http://www.ats-lang.org/ β€” go read it, it's the full lore drop.


πŸ’œ AUTHOR πŸ’œ

patscc was written by Hongwei Xi.

this manual page was written by Matthew Danish <mrd@debian.org>, for the Debian project (and may be used by others). thank you for your service, king 🫢


no cap, that's the whole page. every flag, every path, every default, exactly as written. we don't gatekeep the facts here, we just serve them with ✨aesthetic✨.

and that's a wrap on this manual page β€” dated October 8, 2013, served up as part of the General Commands Manual collection. mwah. πŸ’–