~ chicken-core (master) /csc.mdoc
Trap1.\" Copyright (c) 2007-2022, The CHICKEN Team2.\" All rights reserved.3.\"4.\" Redistribution and use in source and binary forms, with or without5.\" modification, are permitted provided that the following conditions6.\" are met:7.\" 1. Redistributions of source code must retain the above copyright8.\" notice, this list of conditions and the following disclaimer.9.\" 2. Redistributions in binary form must reproduce the above copyright10.\" notice, this list of conditions and the following disclaimer in the11.\" documentation and/or other materials provided with the distribution.12.\" 3. The name of the authors may not be used to endorse or promote products13.\" derived from this software without specific prior written permission.14.\"15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.18.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.25.\"26.\"27.Dd Apr 26, 201728.Dt CSC 129.Os30.Sh NAME31.Nm csc32.Nd driver program for the CHICKEN Scheme compiler33.Sh SYNOPSIS34.Nm35.Op Ar OPTION ...36.Op Ar FILENAME ...37.Sh DESCRIPTION38.Nm39is a program that invokes the CHICKEN compiler and the host systems C compiler to generate40an executable from a Scheme source file or C files generated by CHICKEN.41.Pp42.Ar FILENAME43is a Scheme source file name with optional extension or a C/C++/Objective-C source,44object or library file name with extension.45.Ar OPTION46may be one of the following:47.Pp48General options:49.Bl -tag -width Ds50.It Fl h , Fl help51Display usage text and exit.52.It Fl v , Fl verbose53Show compiler notes and tool-invocations.54.It Fl vv55Display information about translation progress.56.It Fl vvv57Display information about all compilation stages.58.It Fl version59Display Scheme compiler version and exit.60.It Fl release61Display release number and exit.62.El63.Pp64File and pathname options:65.Bl -tag -width Ds66.It Fl o Ar FILENAME , Fl output-file Ar FILENAME67Specifies target executable name.68.It Fl I Ar PATHNAME , Fl include-path Ar PATHNAME69Specifies alternative path for included files.70.It Fl to-stdout71Write compiler to stdout72.Po implies -t Pc .73.It Fl s , Fl shared , Fl dynamic74Generate dynamically loadable shared object file.75.El76.Pp77Language options:78.Bl -tag -width Ds79.It Fl D Ar SYMBOL , Fl feature Ar SYMBOL80Register feature identifier.81.It Fl no-feature Ar SYMBOL82Disable builtin feature identifier.83.It Fl c++84Compile via a C++ source file85.Pq .cpp .86.It Fl objc87Compile via Objective-C source file88.Pq \&.m .89.El90.Pp91Syntax related options:92.Bl -tag -width Ds93.It Fl i , Fl case-insensitive94Don't preserve case of read symbols.95.It Fl K , Fl keyword-style Ar STYLE96Enable alternative keyword-syntax97.Po prefix, suffix or none Pc .98.It Fl no-parentheses-synonyms99Disables list delimiter synonyms.100.It Fl no-symbol-escape101Disables support for escaped symbols.102.It Fl r7rs-syntax103Disables the CHICKEN extensions to R7RS syntax.104.It Fl compile-syntax105Macros are made available at run-time.106.It Fl j Ar MODULE , Fl emit-import-library Ar MODULE107Write compile-time module information into separate file.108.It Fl J , Fl emit-all-import-libraries109Emit import-libraries for all defined modules.110.It Fl no-compiler-syntax111Disable expansion of compiler-macros.112.It Fl m Ar NAME , Fl module Ar NAME113Wrap compiled code in module of the given name.114.It Fl M , Fl module-registration115Always generate module registration code, even when import libraries are emitted.116.It Fl N , Fl no-module-registration117Do not generate module registration code. Overrides118.Fl module-registration .119.El120.Pp121Translation options:122.Bl -tag -width Ds123.It Fl x , Fl explicit-use124Do not use units125.Sq library126and127.Sq eval128by default.129.It Fl P , Fl check-syntax130Stop compilation after macro-expansion.131.It Fl A , Fl analyze-only132Stop compilation after first analysis pass.133.El134.Pp135Debugging options:136.Bl -tag -width Ds137.It Fl w , Fl no-warnings138Disable warnings.139.It Fl d0 , Fl d1 , Fl d2 , Fl d3 , Fl debug-level Ar NUMBER140Set level of available debugging information.141.It Fl no-trace142Disable rudimentary debugging information.143.It Fl profile144Executable emits profiling information.145.It Fl accumulate-profile146Executable emits profiling information in append mode.147.It Fl profile-name Ar FILENAME148Name of the generated profile information file.149.It Fl types Ar FILENAME150Load additional type database.151.El152.Pp153Optimization options:154.Bl -tag -width Ds155.It Fl O , Fl O0 , Fl O1 , Fl O2 , Fl O3 , Fl O4 , Fl O5 , Fl optimize-level Ar NUMBER156Enable certain sets of optimization options.157.It Fl optimize-leaf-routines158Enable leaf routine optimization.159.It Fl no-usual-integrations160Standard procedures may be redefined.161.It Fl u , Fl unsafe162Disable safety checks.163.It Fl local164Assume globals are only modified in current file.165.It Fl b , Fl block166Enable block-compilation.167.It Fl disable-interrupts168Disable interrupts in compiled code.169.It Fl f , Fl fixnum-arithmetic170Assume all numbers are fixnums.171.It Fl disable-stack-overflow-checks172Disables detection of stack-overflows.173.It Fl inline174Enable inlining.175.It Fl inline-limit Ar LIMIT176Set inlining threshold.177.It Fl inline-global178Enable cross-module inlining.179.It Fl specialize180Perform type-based specialization of primitive calls.181.It Fl oi Ar FILENAME , Fl emit-inline-file Ar FILENAME182Generate file with globally inlinable procedures183.Po implies Fl inline Fl local Pc .184.It Fl consult-inline-file Ar FILENAME185Explicitly load inline file.186.It Fl ot Ar FILENAME , Fl emit-types-file Ar FILENAME187Write type-declaration information into file.188.It Fl no-argc-checks189Disable argument count checks.190.It Fl no-bound-checks191Disable bound variable checks.192.It Fl no-procedure-checks193Disable procedure call checks.194.It Fl no-procedure-checks-for-usual-bindings195Disable procedure call checks only for usual bindings.196.It Fl no-procedure-checks-for-toplevel-bindings197Disable procedure call checks for toplevel bindings.198.It Fl strict-types199Assume variable do not change their type.200.It Fl lfa2201Perform additional lightweight flow-analysis pass.202.It Fl unroll-limit Ar LIMIT203Specifies inlining limit for self-recursive calls.204.El205.Pp206Configuration options:207.Bl -tag -width Ds208.It Fl unit Ar NAME209Compile file as a library unit.210.It Fl uses Ar NAME211Declare library unit as used.212.It Fl heap-size Ar NUMBER213Specifies heap-size of compiled executable.214.It Fl nursery Ar NUMBER Fl stack-size Ar NUMBER215Specifies nursery size of compiled executable.216.It Fl X Ar FILENAME , Fl extend Ar FILENAME217Load file before compilation commences.218.It Fl prelude Ar EXPRESSION219Add expression to beginning of source file.220.It Fl postlude Ar EXPRESSION221Add expression to end of source file.222.It Fl prologue Ar FILENAME223Include file before main source file.224.It Fl epilogue Ar FILENAME225Include file after main source file.226.It Fl e , Fl embedded227Compile as embedded228.Po don't generate229.Sq Fn main230.Pc .231.It Fl gui232Compile as GUI application.233.It Fl link Ar NAME234Link extension with compiled executable235.Po implies Sq Fl uses236.Pc .237.It Fl R Ar NAME , Fl require-extension Ar NAME238Require extension and import in compiled code.239.It Fl dll , Fl library240Compile multiple units into a dynamic library.241.It Fl libdir Ar DIRECTORY242Override location of runtime library directory.243.El244.Pp245Options to other passes:246.Bl -tag -width Ds247.It Fl C Ar OPTION248Pass option to C compiler.249.It Fl L Ar OPTION250Pass option to linker.251.It Fl I Ns Ar <DIR>252Pass253.Dq -I Ns Ar <DIR>254to C compiler255.Po add include path Pc .256.It Fl L Ns Ar <DIR>257Pass258.Dq -L Ns Ar <DIR>259to linker260.Po add library path Pc .261.It Fl k262Keep intermediate files.263.It Fl c264Stop after compilation to object files.265.It Fl t266Stop after translation to C.267.It Fl cc Ar COMPILER268Select a C compiler other than the default.269.It Fl cxx Ar COMPILER270Select a C++ compiler other than the default.271.It Fl ld Ar COMPILER272Select a linker other than the default.273.It Fl static274Link with static CHICKEN libraries and extensions.275.It Fl F Ns Ar <DIR>276Pass277.Dq -F Ns Ar <DIR>278to C compiler279.Po add framework header path on Mac OS X Pc .280.It Fl framework Ar NAME281Passed to linker on Mac OS X.282.It Fl rpath Ar PATHNAME283Add directory to runtime library search path.284.It Fl Wl,...285Pass linker options.286.It Fl strip287Strip resulting binary.288.El289.Pp290Inquiry options:291.Bl -tag -width Ds292.It Fl home293Show home-directory294.Po where support files go Pc .295.It Fl cflags296Show required C-compiler flags and exit.297.It Fl ldflags298Show required linker flags and exit.299.It Fl libs300Show required libraries and exit.301.It Fl cc-name302Show name of default C compiler used.303.It Fl cxx-name304Show name of default C++ compiler used.305.It Fl ld-name306Show name of default linker used.307.It Fl dry-run308Just show commands executed, don't run them309.Po implies Sq Fl v310.Pc .311.El312.Pp313Obscure options:314.Bl -tag -width Ds315.It Fl debug Ar MODES316Display debugging output for the given modes.317.It Fl compiler Ar PATHNAME318Use a compiler other than the default319.Sq chicken .320.It Fl raw321Do not generate implicit init- and exit code.322.It Fl emit-external-prototypes-first323Emit prototypes for callbacks before foreign declarations.324.It Fl regenerate-import-libraries325Always emit import libraries, even when their contents haven't changed.326The default behaviour is to preserve existing import libraries.327.It Fl ignore-repository328Do not refer to repository for extensions.329.It Fl keep-shadowed-macros330Do not remove shadowed macros.331.It Fl host332Compile for host when configured for cross-compiling.333.It Fl private-repository334Load extensions from executable path.335.It Fl deployed336Link support file to be used from a deployed executable337.Po sets338.Sq rpath339accordingly, if supported on this platform.340.Pc341.It Fl no-elevation342Embed manifest on Windows to supress elevation warnings for programs named343.Sq install344or345.Sq setup .346.El347.Pp348Options can be collapsed if unambiguous, so349.Dq -vkfO350is the same as351.Dq -v -k -fixnum-arithmetic -optimize .352.Sh ENVIRONMENT353The following environment variables change the behaviour of354.Nm Ns :355.Bl -tag -width CSC_OPTIONS356.It Ev CSC_OPTIONS357Can hold default options that should be passed to every invocation of358.Nm .359.El360.Sh EXIT STATUS361.Ex -std362.Sh SEE ALSO363.Xr chicken 1364.Pp365More information can be found in the366.Lk http://wiki.call-cc.org/manual/index "CHICKEN User's Manual".367.Sh AUTHORS368.An The CHICKEN Team369.Sh BUGS370Submit bug reports by e-mail to371.Mt chicken-janitors@nongnu.org