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


Ignore:
Timestamp:
12/28/08 01:30:31 (12 years ago)
Author:
felix winkelmann
Message:

changed semantics of -static-extension option; added it to core compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/csc.scm

    r12789 r12896  
    176176    -check-syntax -case-insensitive -benchmark-mode -shared -compile-syntax -no-lambda-info
    177177    -lambda-lift -dynamic -disable-stack-overflow-checks -local
    178     -emit-external-prototypes-first -inline -extension -release -static-extensions
     178    -emit-external-prototypes-first -inline -extension -release
    179179    -analyze-only -keep-shadowed-macros -inline-global) -ignore-repository)
    180180
     
    182182  '(-debug -output-file -heap-size -nursery -stack-size -compiler -unit -uses -keyword-style
    183183    -optimize-level -include-path -database-size -extend -prelude -postlude -prologue -epilogue
    184     -inline-limit -profile-name -disable-warning
    185     -require-static-extension -emit-inline-file
     184    -inline-limit -profile-name -disable-warning -emit-inline-file
    186185    -feature -debug-level -heap-growth -heap-shrinkage -heap-initial-size
    187     -emit-import-library))
     186    -emit-import-library -static-extension))
    188187
    189188(define-constant shortcuts
     
    207206
    208207(define short-options
    209   (string->list "PHhsfiENxubvwAOeWkctgG") )
     208  (string->list "PHhsfiENxubvwAOeWkctg") )
    210209
    211210
     
    306305(define static #f)
    307306(define static-libs #f)
    308 (define static-extensions #f)
     307(define static-extensions '())
    309308(define required-extensions '())
    310309(define gui #f)
     
    432431    -static-libs                link with static CHICKEN libraries
    433432    -static                     generate completely statically linked executable
    434     -static-extensions          link with static extensions (if available)
     433    -static-extension NAME      link extension NAME statically (if available)
    435434    -F<DIR>                     pass \"-F<DIR>\" to C compiler (add framework
    436435                                 header path on Mac OS X)
     
    565564                (set! translate-options (cons* "-feature" "chicken-compile-static" translate-options))
    566565                (set! static-libs #t) ]
    567                [(-static-extensions)
    568                 (set! static-extensions #t) ]
    569566               [(-cflags)
    570567                (set! inquiry-only #t)
     
    610607                (set! required-extensions (append required-extensions (list (car rest))))
    611608                (t-options "-require-extension" (car rest))
     609                (set! rest (cdr rest)) ]
     610               [(-static-extension)
     611                (check s rest)
     612                (set! static-extensions (append static-extensions (list (car rest))))
     613                (t-options "-static-extension" (car rest))
    612614                (set! rest (cdr rest)) ]
    613615               [(-windows |-W|)
     
    776778                              '("-to-stdout")
    777779                              `("-output-file" ,(cleanup-filename fc)) )
    778                           (if (or static static-libs static-extensions)
    779                               (map (lambda (e) (conc "-uses " e)) required-extensions)
    780                               '() )
    781780                          (map quote-option (append translate-options translation-optimization-options)) ) )
    782781                  " ") ) )
     
    856855(define (static-extension-info)
    857856  (let ((rpath (repository-path)))
    858     (if (and rpath (or static static-libs static-extensions))
    859         (let loop ((exts required-extensions) (libs '()) (opts '()))
     857    (if (and rpath (pair? static-extensions))
     858        (let loop ((exts static-extensions) (libs '()) (opts '()))
    860859          (if (null? exts)
    861860              (values (reverse libs) (reverse opts))
     
    909908
    910909(define (quote-option x)
    911   (if (any (lambda (c)
    912              (or (char-whitespace? c) (memq c +hairy-chars+)) )
    913            (string->list x) )
     910  (if (string-any (lambda (c)
     911                    (or (char-whitespace? c) (memq c +hairy-chars+)) )
     912                  x)
    914913      (cleanup x)
    915914      x) )
Note: See TracChangeset for help on using the changeset viewer.