Changeset 13694 in project for chicken/trunk/csc.scm


Ignore:
Timestamp:
03/12/09 07:46:49 (11 years ago)
Author:
Kon Lovett
Message:

Added 'symbol-escape' support. Renamed 'parenthesis-synonyms' -> 'parentheses-synonyms'. Changed command-line option for 'parentheses-synonyms' to 'no-parentheses-synonyms' since binary only. Added minor comments to 'regex', used common identifier name for regular-expression argument. Re-flowed command usage so under 80 columns. Updated manual with new features.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/csc.scm

    r13672 r13694  
    128128    -lambda-lift -dynamic -disable-stack-overflow-checks -local
    129129    -emit-external-prototypes-first -inline -extension -release
    130     -analyze-only -keep-shadowed-macros -inline-global) -ignore-repository)
     130    -analyze-only -keep-shadowed-macros -inline-global -ignore-repository
     131    -no-symbol-escape -no-parentheses-synonyms -chicken-syntax -r5rs-syntax))
    131132
    132133(define-constant complex-options
     
    264265
    265266(define (usage)
    266   (display
    267 "Usage: csc FILENAME | OPTION ...
    268 
    269   `csc' is a driver program for the CHICKEN compiler. Any Scheme, C or object
    270   files and all libraries given on the command line are translated, compiled or
    271   linked as needed.
     267  (display #<<EOF
     268Usage: csc FILENAME | OPTION ...
     269
     270  `csc' is a driver program for the CHICKEN compiler. Files given on the
     271  command line are translated, compiled or linked as needed.
     272
     273  FILENAME is a Scheme source file name with optional extension or a
     274  C/C++/Objective-C source, object or library file name with extension. OPTION
     275  may be one of the following:
    272276
    273277  General options:
    274278
    275     -h  -help                   display this text and exit
    276     -v                          show intermediate compilation stages
    277     -v2  -verbose               display information about translation progress
    278     -v3                         display information about all compilation stages
    279     -V  -version                display Scheme compiler version and exit
    280     -release                    display release number and exit
     279    -h  -help                      display this text and exit
     280    -v                             show intermediate compilation stages
     281    -v2  -verbose                  display information about translation
     282                                    progress
     283    -v3                            display information about all compilation
     284                                    stages
     285    -V  -version                   display Scheme compiler version and exit
     286    -release                       display release number and exit
    281287
    282288  File and pathname options:
    283289
    284     -o -output-file FILENAME    specifies target executable name
    285     -I -include-path PATHNAME   specifies alternative path for included files
    286     -to-stdout                  write compiler to stdout (implies -t)
    287     -s -shared -dynamic         generate dynamically loadable shared object file
     290    -o -output-file FILENAME       specifies target executable name
     291    -I -include-path PATHNAME      specifies alternative path for included
     292                                    files
     293    -to-stdout                     write compiler to stdout (implies -t)
     294    -s -shared -dynamic            generate dynamically loadable shared object
     295                                    file
    288296
    289297  Language options:
    290298
    291     -D  -DSYMBOL  -feature SYMBOL
    292                                 register feature identifier
    293     -c++                        Compile via a C++ source file (.cpp)
    294     -objc                       Compile via Objective-C source file (.m)
     299    -D  -DSYMBOL  -feature SYMBOL  register feature identifier
     300    -c++                           compile via a C++ source file (.cpp)
     301    -objc                          compile via Objective-C source file (.m)
    295302
    296303  Syntax related options:
    297304
    298     -i -case-insensitive        don't preserve case of read symbols   
    299     -K -keyword-style STYLE     allow alternative keyword syntax (prefix, suffix or none)
    300        -parenthesis-synonyms STYLE
    301                                 allow list delimiter synonyms (block or none)
    302     -compile-syntax             macros are made available at run-time
    303     -j -emit-import-library MODULE
    304                                 write compile-time module information into separate file
     305    -i -case-insensitive           don't preserve case of read symbols   
     306    -k  -keyword-style STYLE       enable alternative keyword-syntax
     307                                    (prefix, suffix or none)
     308        -no-parentheses-synonyms   disables list delimiter synonyms
     309        -no-symbol-escape          disables support for escaped symbols
     310        -chicken-syntax            enables the Chicken extensions to
     311                                    R5RS syntax
     312        -r5rs-syntax               disables the Chicken extensions to
     313                                    R5RS syntax
     314    -compile-syntax                macros are made available at run-time
     315    -j -emit-import-library MODULE write compile-time module information into
     316                                    separate file
    305317
    306318  Translation options:
    307319
    308     -x  -explicit-use           do not use units `library' and `eval' by default
    309     -P  -check-syntax           stop compilation after macro-expansion
    310     -A  -analyze-only           stop compilation after first analysis pass
     320    -x  -explicit-use              do not use units `library' and `eval' by
     321                                    default
     322    -P  -check-syntax              stop compilation after macro-expansion
     323    -A  -analyze-only              stop compilation after first analysis pass
    311324
    312325  Debugging options:
    313326
    314     -w  -no-warnings            disable warnings
    315     -disable-warning CLASS      disable specific class of warnings
     327    -w  -no-warnings               disable warnings
     328    -disable-warning CLASS         disable specific class of warnings
    316329    -d0 -d1 -d2 -debug-level NUMBER
    317                                 set level of available debugging information
    318     -no-trace                   disable rudimentary debugging information
    319     -profile                    executable emits profiling information
    320     -accumulate-profile         executable emits profiling information in append mode
    321     -profile-name FILENAME      name of the generated profile information file
     330                                   set level of available debugging information
     331    -no-trace                      disable rudimentary debugging information
     332    -profile                       executable emits profiling information
     333    -accumulate-profile            executable emits profiling information in
     334                                    append mode
     335    -profile-name FILENAME         name of the generated profile information
     336                                    file
    322337
    323338  Optimization options:
    324339
    325340    -O -O1 -O2 -O3 -O4 -optimize-level NUMBER
    326                                 enable certain sets of optimization options
    327     -optimize-leaf-routines     enable leaf routine optimization
    328     -N  -no-usual-integrations  standard procedures may be redefined
    329     -u  -unsafe                 disable safety checks
    330     -local                      assume globals are only modified in current file
    331     -b  -block                  enable block-compilation
    332     -disable-interrupts         disable interrupts in compiled code
    333     -f  -fixnum-arithmetic      assume all numbers are fixnums
    334     -Ob  -benchmark-mode        equivalent to '-block -optimize-level 4
    335                                  -debug-level 0 -fixnum-arithmetic -lambda-lift
    336                                  -disable-interrupts -inline'
    337     -lambda-lift                perform lambda-lifting
    338     -unsafe-libraries           link with unsafe runtime system
    339     -disable-stack-overflow-checks  disables detection of stack-overflows
    340     -inline                     enable inlining
    341     -inline-limit               set inlining threshold
    342     -inline-global              enable cross-module inlining
    343     -n -emit-inline-file FILENAME 
    344                                 generate file with globally inlinable procedures
    345                                 (implies -inline -local)
     341                                   enable certain sets of optimization options
     342    -optimize-leaf-routines        enable leaf routine optimization
     343    -N  -no-usual-integrations     standard procedures may be redefined
     344    -u  -unsafe                    disable safety checks
     345    -local                         assume globals are only modified in current
     346                                    file
     347    -b  -block                     enable block-compilation
     348    -disable-interrupts            disable interrupts in compiled code
     349    -f  -fixnum-arithmetic         assume all numbers are fixnums
     350    -Ob  -benchmark-mode           equivalent to '-block -optimize-level 4
     351                                    -debug-level 0 -fixnum-arithmetic
     352                                    -lambda-lift -inline -disable-interrupts'
     353    -lambda-lift                   perform lambda-lifting
     354    -unsafe-libraries              link with unsafe runtime system
     355    -disable-stack-overflow-checks disables detection of stack-overflows
     356    -inline                        enable inlining
     357    -inline-limit                  set inlining threshold
     358    -inline-global                 enable cross-module inlining
     359    -n -emit-inline-file FILENAME  generate file with globally inlinable
     360                                    procedures (implies -inline -local)
    346361
    347362  Configuration options:
    348363
    349     -unit NAME                  compile file as a library unit
    350     -uses NAME                  declare library unit as used.
    351     -heap-size NUMBER           specifies heap-size of compiled executable
    352     -heap-initial-size NUMBER   specifies heap-size at startup time
    353     -heap-growth PERCENTAGE     specifies growth-rate of expanding heap
    354     -heap-shrinkage PERCENTAGE  specifies shrink-rate of contracting heap
     364    -unit NAME                     compile file as a library unit
     365    -uses NAME                     declare library unit as used.
     366    -heap-size NUMBER              specifies heap-size of compiled executable
     367    -heap-initial-size NUMBER      specifies heap-size at startup time
     368    -heap-growth PERCENTAGE        specifies growth-rate of expanding heap
     369    -heap-shrinkage PERCENTAGE     specifies shrink-rate of contracting heap
    355370    -nursery NUMBER  -stack-size NUMBER
    356                                 specifies nursery size of compiled executable
    357     -X -extend FILENAME         load file before compilation commences
    358     -prelude EXPRESSION         add expression to beginning of source file
    359     -postlude EXPRESSION        add expression to end of source file
    360     -prologue FILENAME          include file before main source file
    361     -epilogue FILENAME          include file after main source file
    362     -ignore-repository          do not refer to repository for extensions
    363 
    364     -e  -embedded               compile as embedded (don't generate `main()')
    365     -W  -windows                compile as Windows GUI application (MSVC only)
    366     -R  -require-extension NAME require extension and import in compiled code
    367     -E  -extension              compile as extension (dynamic or static)
    368     -dll -library               compile multiple units into a dynamic library
     371                                   specifies nursery size of compiled
     372                                   executable
     373    -X -extend FILENAME            load file before compilation commences
     374    -prelude EXPRESSION            add expression to beginning of source file
     375    -postlude EXPRESSION           add expression to end of source file
     376    -prologue FILENAME             include file before main source file
     377    -epilogue FILENAME             include file after main source file
     378    -ignore-repository             do not refer to repository for extensions
     379
     380    -e  -embedded                  compile as embedded
     381                                    (don't generate `main()')
     382    -W  -windows                   compile as Windows GUI application
     383                                    (MSVC only)
     384    -R  -require-extension NAME    require extension and import in compiled
     385                                    code
     386    -E  -extension                 compile as extension (dynamic or static)
     387    -dll -library                  compile multiple units into a dynamic
     388                                    library
    369389
    370390  Options to other passes:
    371391
    372     -C OPTION                   pass option to C compiler
    373     -L OPTION                   pass option to linker
    374     -I<DIR>                     pass \"-I<DIR>\" to C compiler (add include path)
    375     -L<DIR>                     pass \"-L<DIR>\" to linker (add library path)
    376     -k                          keep intermediate files
    377     -c                          stop after compilation to object files
    378     -t                          stop after translation to C
    379     -cc COMPILER                select other C compiler than the default one
    380     -cxx COMPILER               select other C++ compiler than the default one
    381     -ld COMPILER                select other linker than the default one
    382     -lLIBNAME                   link with given library (`libLIBNAME' on UNIX,
    383                                  `LIBNAME.lib' on Windows)                               
    384     -static-libs                link with static CHICKEN libraries
    385     -static                     generate completely statically linked executable
    386     -static-extension NAME      link extension NAME statically (if available)
    387     -F<DIR>                     pass \"-F<DIR>\" to C compiler (add framework
    388                                  header path on Mac OS X)
    389     -framework NAME             passed to linker on Mac OS X
    390     -rpath PATHNAME             add directory to runtime library search path
    391     -Wl,...                     pass linker options
    392     -strip                      strip resulting binary
     392    -C OPTION                      pass option to C compiler
     393    -L OPTION                      pass option to linker
     394    -I<DIR>                        pass \"-I<DIR>\" to C compiler
     395                                    (add include path)
     396    -L<DIR>                        pass \"-L<DIR>\" to linker
     397                                    (add library path)
     398    -k                             keep intermediate files
     399    -c                             stop after compilation to object files
     400    -t                             stop after translation to C
     401    -cc COMPILER                   select other C compiler than the default one
     402    -cxx COMPILER                  select other C++ compiler than the default one
     403    -ld COMPILER                   select other linker than the default one
     404    -lLIBNAME                      link with given library
     405                                    (`libLIBNAME' on UNIX,
     406                                     `LIBNAME.lib' on Windows)
     407    -static-libs                   link with static CHICKEN libraries
     408    -static                        generate completely statically linked
     409                                    executable
     410    -static-extension NAME         link extension NAME statically
     411                                    (if available)
     412    -F<DIR>                        pass \"-F<DIR>\" to C compiler
     413                                    (add framework header path on Mac OS X)
     414    -framework NAME                passed to linker on Mac OS X
     415    -rpath PATHNAME                add directory to runtime library search path
     416    -Wl,...                        pass linker options
     417    -strip                         strip resulting binary
    393418
    394419  Inquiry options:
    395420
    396     -home                       show home-directory (where support files go)
    397     -cflags                     show required C-compiler flags and exit
    398     -ldflags                    show required linker flags and exit
    399     -libs                       show required libraries and exit
    400     -cc-name                    show name of default C compiler used
    401     -cxx-name                   show name of default C++ compiler used
    402     -ld-name                    show name of default linker used
    403     -dry-run                    just show commands executed, don't run them
    404                                  (implies `-v')
     421    -home                          show home-directory (where support files go)
     422    -cflags                        show required C-compiler flags and exit
     423    -ldflags                       show required linker flags and exit
     424    -libs                          show required libraries and exit
     425    -cc-name                       show name of default C compiler used
     426    -cxx-name                      show name of default C++ compiler used
     427    -ld-name                       show name of default linker used
     428    -dry-run                       just show commands executed, don't run them
     429                                    (implies `-v')
    405430
    406431  Obscure options:
    407432
    408     -debug MODES                display debugging output for the given modes
    409     -compiler PATHNAME          use other compiler than default `chicken'
    410     -disable-c-syntax-checks    disable syntax checks of C code fragments
    411     -raw                        do not generate implicit init- and exit code                           
    412     -emit-external-prototypes-first  emit protoypes for callbacks before foreign
    413                                  declarations
    414     -keep-shadowed-macros       do not remove shadowed macro
    415     -host                       compile for host when configured for cross-compiling
     433    -debug MODES                   display debugging output for the given modes
     434    -compiler PATHNAME             use other compiler than default `chicken'
     435    -disable-c-syntax-checks       disable syntax checks of C code fragments
     436    -raw                           do not generate implicit init- and exit code
     437    -emit-external-prototypes-first
     438                                   emit protoypes for callbacks before foreign
     439                                    declarations
     440    -keep-shadowed-macros          do not remove shadowed macro
     441    -host                          compile for host when configured for
     442                                    cross-compiling
    416443
    417444  Options can be collapsed if unambiguous, so
     
    423450    -v -k -fixnum-arithmetic -optimize
    424451
    425   The contents of the environment variable CSC_OPTIONS are implicitly
    426   passed to every invocation of `csc'.
    427 "
     452  The contents of the environment variable CSC_OPTIONS are implicitly passed to
     453  every invocation of `csc'.
     454
     455EOF
    428456) )
    429457
     
    462490             (newline)
    463491             (exit) )
    464            #;(when (null? scheme-files)
     492           #; ;UNUSED
     493           (when (null? scheme-files)
    465494             (set! scheme-files c-files)
    466495             (set! c-files '()) )
Note: See TracChangeset for help on using the changeset viewer.