kefir-cc1(1)
π kefir-cc1(1) β General Commands Manual π
okay so. bestie. meet kefir-cc1, a C17/C23 language compiler β and the whole personality of this page is that it's the compiler core with no driver attached. Like, it's the main character before the entourage shows up. β¨
πΈ SYNOPSIS πΈ
kefir-cc1 [options] [file]
π¦ DESCRIPTION π¦
kefir-cc1 is a C17/C23 language compiler β but without a driver, iykyk. That means you feed it stuff directly, no hand-holding.
And if you don't hand it an input file at all? It just reads from stdin. no cap, it will literally wait there for you to type. π«Ά
β¨ OPTIONS β¨
so here's the menu. every single flag, no skipping, we don't do that here π
--c17-standardβ use the C17 language standard.--c23-standardβ use the C23 language standard.--pp-timestamp timestampβ override the preprocessor timestamp. yes, you get to be the clock now β°--json-errorsβ print errors in JSON format to stderr.--tabular-errorsβ print errors in tabular format to stderr. tables!! for your errors!!--target-profile profileβ generate code for the specified target (peep the TARGET subsection π―).--source-id identifierβ force it to use the source file identifier you provide.--extension-lib libpathβ load an extension library.--quote-include-dir dirβ add a directory to the include search path exclusively for quoted includes. exclusive!! π--system-include-dir dirβ add a directory to the include search path and mark it as a system include path (used for dependency output).--embed-dir directoryβ add a directory to the preprocessor embed search path.--debug-infoβ include debug information in the produced output. so your debugger can actually find things π--optimizer-max-inline-depth depthβ maximum depth of function inlining (5by default).--optimizer-max-inlines-per-func inlinesβ maximum number of inlined functions (10by default).--enable-loweringβ perform target-specific SSA lowering β and heads up, this is mandatory for bit-precise integer support β[default].--disable-loweringβ skip target-specific SSA lowering.--preprocessor-assembly-modeβ enable assembly preprocessing mode (default for.Sfiles). In this mode, leading'$'characters are not treated as part of an identifier.--preprocessor-normal-modeβ disable assembly preprocessing mode (default).--dump-dependenciesβ output a make rule describing the dependencies of the source file.--system-dependenciesβ include dependencies from system include directories in the make rule (used with the--dump-dependenciesflag)[default: on].--no-system-dependenciesβ do not include dependencies from system include directories in the make rule (used with the--dump-dependenciesflag).--add-phony-targetsβ generate phony make targets for each dependency (used with the--dump-dependenciesflag)[default: off].--no-add-phony-targetsβ do not generate phony make targets for each dependency (used with--dump-dependencies).--dependency-target targetβ override the default make rule target (used with the--dump-dependenciesflag).--dependency-output filenameβ output the make rule into the specified file (used with the--dump-dependenciesflag).--unsigned-charβ let the typecharbe unsigned. By default it's target-specific.--signed-charβ let the typecharbe signed. By default it's target-specific.--codegen-tentative-commonβ place tentative definitions into the common section (equivalent to applying thecommonattribute to all variables).--codegen-tentative-no-commonβ do not place tentative definitions into the common section[default].--codegen-visibility-defaultβ keep default visibility for all symbols[default].--codegen-visibility-hiddenβ make all symbols hidden unless an attribute says otherwise.--codegen-visibility-protectedβ make all symbols protected unless an attribute says otherwise.--codegen-visibility-internalβ make all symbols internal unless an attribute says otherwise.--feature-[name]β enable a compiler feature (see the FEATURES subsection).--no-feature-[name]β disable a compiler feature (see the FEATURES subsection).--internal-[flag]β enable a compiler internal flag (see the INTERNALS subsection).--no-internal-[flag]β disable a compiler internal flag (see the INTERNALS subsection).--codegen-[option]β enable an option for the code generator (see the CODEGEN subsection).--no-codegen-[option]β disable an option for the code generator (see the CODEGEN subsection).--optimizer-pipeline specβ optimizer pipeline specification (see the OPTIMIZER subsection).--precise-bitfield-load-storeβ load and store bitfields at byte boundaries[default: on]. Gives you extra correctness for structures allocated close to a boundary with unmapped memory pages at the expense of less efficient bitfield handling. Does not change bitfield layout.--no-precise-bitfield-load-storeβ load and store bitfields at machine word boundaries[default: off]. β οΈ may cause failures for structures allocated close to boundaries with unmapped memory pages. Does not change bitfield layout.--declare-atomic-supportβ declare support of atomics (might require explicit linking of a software atomic library such aslibatomicorlibcompiler_rt).--no-declare-atomic-supportβ declare the absence of atomic support by defining the__STDC_NO_ATOMICS__macro.--optimize-stack-frameβ optimize stack frame layout by reusing space for variables with disjoint lifetimes. Might increase compilation time and memory use on very large functions.[default: on].--no-optimize-stack-frameβ do not optimize stack frame layout, and allocate each variable separately.
π FEATURES π
these are the supported features β use them with the --feature-[feature-name] and --no-feature-[feature-name] flags. heads up: all disabled by default. π
fail-on-attributesβ fail if__attribute__((...))is encountered.missing-function-return-typeβ permit function definitions with a missing return type.designated-init-colonsβ permit the"fieldname:"syntax in designated initializers.labels-as-valuesβ permit label-addressing with the&&operator.non-strict-qualifiersβ disable strict qualifier checks for pointers.signed-enumsβ force all enums to have a signed integral type.implicit-function-declβ permit implicit function declarations at the use-site.empty-structsβ permit empty structure/union definitions.ext-pointer-arithmeticsβ permit pointer arithmetics with function andvoidpointers.missing-braces-subobjβ permit missing braces for subobject initialization with a scalar.statement-expressionsβ enable statement expressions.omitted-conditional-operandβ permit omission of the middle ternary expression operand.int-to-pointerβ permit conversion of any integral type to a pointer.permissive-pointer-convβ permit conversions between any pointer types.named-macro-varargβ permit named macro variable arguments.include-nextβ permit theinclude_nextpreprocessor directive.fail-on-assemblyβ disable support of inline assembly.va-args-comma-concatβ enable special processing for the", ##__VA_ARGS"case in the preprocessor.switch-case-rangesβ enable support for ranges inswitchcases.designator-subscript-rangesβ enable support for ranges in designator subscripts.
π CODEGEN π
these are the supported code generator options β used with the --codegen-[option] and --no-codegen-[option] flags:
emulated-tlsβ use emulated TLS[disabled by default, enabled on openbsd platform].tls-commonβ generate a common section for thread-local storage if the respective attribute is on[enabled for linux and netbsd].picβ generate position-independent code.omit-frame-pointerβ omit the frame pointer in leaf functions that don't need it.valgrind-compatible-x87β replace x87 opcodes not supported by Valgrind with more expensive alternatives[default: on].syntax=SYNTAXβ produce assembly output with the specified syntax βx86_64-intel_noprefix,x86_64-intel_prefix,x86_64-att(default).details=DETAILS-SPECβ augment assembly output with internal code generator details in comments.DETAILS-SPECcan be:vasm(virtual assembly),vasm+regs(virtual assembly and register allocations),devasm(devirtualized assembly).pipeline=PIPELINE-SPECβ code generator transformation pipeline specification (not supported fornative-*targets), made up of comma separated names of pipeline passes:noopβ no-operation pass.amd64-drop-virtualβ non-functional virtual instruction elimination for amd64 targets.amd64-peepholeβ peephole optimizations for amd64 targets.
π₯ OPTIMIZER π₯
the optimizer pipeline specification is made up of comma separated names of optimization pipeline passes:
noopβ no-operation pass.phi-propagateβ wherever possible, substitute phi nodes of the SSA representation by actual references.mem2regβ pull function local variables into registers.op-simplifyβ general code simplification.constant-foldβ folding constant expressions.gvnβ global value numbering pass to eliminate redundant arithmetic and bitwise operations.local-alloc-sinkβ moving local variable allocations closer to their actual uses (does not affect effective variable lifetimes).dead-code-eliminationβ eliminating dead code, blocks and phi links.block-mergeβ remove unnecessary jump instructions and merge the respective blocks.dead-allocβ remove dead local variable allocations.inline-funcβ perform function inlining.tail-callsβ perform tail call optimization.loweringβ perform target-specific lowering of the SSA representation. Mandatory for bit-precise integer support.
π― TARGET π―
supported compilation targets β yes, there's one, and it's iconic:
amd64-sysv-gasβ produce optimized GNU As-compatible assembly adhering to the System-V AMD64 ABI[default].
π EXIT STATUS π
normally kefir-cc1 exits with exit code 0. π«Ά
but if there are any errors in any of the compilation stages, all further compilation is aborted and a non-zero exit code is returned. π
β STANDARDS β
kefir-cc1 implements the C17 language standard as specified in its final draft, and the C23 language standard (except _Decimal support) as specified in the first draft of C2Y. periodt. π
π NOTES π
okay bestie, housekeeping time β the boring-but-actually-important stuff π
Licensing tea: the kefir-cc1 compiler is licensed under the terms of the GNU GPLv3 license. periodt. that's the whole vibe. β¨
Who's behind this icon: kefir-cc1 is developed and maintained by Jevgenij Protopopov (legally: Jevgenijs Protopopovs) π«Ά like, put some respect on the name fr fr π
Found a bug? π please report bugs found in kefir-cc1 to jevgenij@protopopov.lv. do NOT suffer in silence, bestie β that's not the move π
Where to find it: kefir-cc1 is available online at https://sr.ht/~jprotopopov/kefir/ with read-only mirrors at https://git.protopopov.lv/kefir and https://codeberg.org/jprotopopov/kefir π go follow the lore iykyk
and that's a wrap on the whole page, bestie π this cutie comes to you from the Debian fam, dated September 2025, and yes β it's literally kefir-cc1(1) π slay, go compile something iconic β¨π¦
π¦ where this page comes from
- alpine 3.24: kefir-doc 0.5.0-r1 Β· GPL-3.0-only AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms