MGNUC(1)

πŸ“¦
version 22.01.8 Β· 3 versions
, in alpine 3.24

πŸŽ€ MGNUC πŸŽ€

okay bestie, so this is mgnuc β€” it's from the General Commands Manual section, and honestly she's giving "quiet backend icon" energy. πŸ’…

✨ NAME ✨

mgnuc β€” Mercury front-end to GNU C. that's it, that's the vibe. πŸ’–

✨ SYNOPSIS ✨

mgnuc [<options>] [-- <gcc options>] files...

🌸 NOTES 🌸

so mgnuc is one of the dev tools that ship as part of the Mercury distribution. she's part of the squad, not a solo act. 🫢

and like, real talk β€” this manual page is literally just a brief summary, bestie, it's not the whole saga. for further info you gotta see the Mercury User's Guide. no cap, that's where the lore lives. πŸ“–

πŸ’… OPTIONS πŸ’…

  • -v, --verbose β€” echoes the gcc command before it runs it. so you can see exactly what she's about to do instead of just vibing in the dark πŸ‘€
  • --no-ansi β€” uses the full contents of the system headers instead of just the ANSI subset. going full send on headers, basically 🌈
  • --no-check β€” don't enable any of gcc's warnings. zero warnings, zero thoughts, pure peace 😌
  • --low-level-debug β€” enables low-level debugging of the C code. and listen β€” this one's useful only for Mercury system developers, so if that's not you, this is not your moment 🫣
  • -g, --c-debug β€” generates object files that can be debugged with C debuggers like gdb. so when it breaks you actually get to see why πŸ”
  • --no-c-optimize β€” disables optimization by the C compiler. she'll be slow but she'll be honest πŸ’€
  • --inline-alloc β€” inlines calls to the memory allocator ✨
  • --mercury-standard-library-directory <directory>
  • --mercury-stdlib-dir <directory> β€” the directory containing the installed Mercury standard library πŸ“ (both flags, same job, pick your fave)
  • --no-mercury-standard-library-directory, --no-mercury-stdlib-dir β€” don't use an installed Mercury standard library. going off-grid, no library, feral mode πŸ™ˆ
  • --no-filter-cc β€” do not filter warnings from the C compiler. let them all through, raw and unfiltered πŸŽ€
  • --halt-at-warn-if-possible β€” converts warnings into errors if (a) the C compiler supports this, and (b) the grade is an MLDS grade. minor caveat bestie: LLDS grades get some warnings that cannot be avoided 😭

πŸ‘‘ GRADE OPTIONS πŸ‘‘

  • -s <grade>, --grade <grade>
  • --target {c, csharp, java}
  • --asm-labels
  • --gcc-non-local-gotos
  • --gcc-global-registers
  • -H, --high-level-code
  • --parallel
  • --gc {boehm, boehm_debug, hgc, accurate, none}
  • -p, --profiling
  • --profile-calls
  • --profile-time
  • --profile-memory
  • --profile-deep
  • --record-term-sizes-as-words
  • --record-term-sizes-as-cells
  • --use-trail
  • --use-trail-segments
  • --reserve-tag
  • --use-minimal-model-stack-copy
  • --use-minimal-model-own-stacks
  • --minimal-model-debug
  • --single-prec-float
  • --pic-reg
  • --no-stack-trace
  • --debug
  • --decl-debug
  • --ss-debug
  • --low-level-debug
  • --extend-stacks-when-needed
  • --stack-segments
  • --use-regions β€” see the documentation in the "Invocation" section of the Mercury User's Guide πŸ“š
and yes, that pointer to the "Invocation" section of the Mercury User's Guide is the whole mood for this list β€” it's where the actual explanations live. iykyk 🧚

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually do? she runs gcc with the appropriate options for compiling Mercury programs. that's the whole job and she does it well, periodt. πŸ’–

normally she invokes gcc in ANSI mode with almost all warnings enabled β€” very "i'm watching you" of her β€” but you can change that using the --no-ansi or --no-check options. your call, bestie ✨

🌈 ENVIRONMENT VARIABLES 🌈

MERCURY_DEFAULT_GRADE.

that's the one. that's the list. πŸ’œ

⭐ FILES ⭐

here's a cute one: if the current directory contains a file named .mgnuc_copts, then mgnuc will assume it contains C compiler options that should be included on the C compiler's command line. πŸ“

and like, what's it usually used for? specifying C compiler search paths. that's her whole thing. no notes πŸ”₯

πŸ’– AUTHORS πŸ’–

the Mercury team. collectively. as a unit. slay πŸ‘‘

this program and its documentation are copyright by the University of Melbourne and the Mercury team. and important bit β€” they may be copied only under the terms of the GNU General Public License, so go see the file COPYING in the Mercury distribution. it's giving "read the paperwork before you copy anything," bestie, don't skip it 🫢

πŸ” SEE ALSO πŸ”


okay that's the whole page, and for the sign-off: this beauty lives in the Mercury Programmer's Manual, dated 2026-04-24 β€” go forth and compile, bestie, you're gonna ate this πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from