~ chicken-core (chicken-5) dac431ef10ac400d3655677b764469306132aede


commit dac431ef10ac400d3655677b764469306132aede
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Jul 27 13:09:06 2010 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Jul 27 13:09:06 2010 +0200

    renamed -no-import-library to -no-module-registration

diff --git a/batch-driver.scm b/batch-driver.scm
index 61f16687..7eaf6961 100644
--- a/batch-driver.scm
+++ b/batch-driver.scm
@@ -177,7 +177,7 @@
     (when (and (memq 'emit-all-import-libraries options)
 	       (not a-only))
       (set! all-import-libraries #t))
-    (set! no-import-libraries (memq 'no-import-library options))
+    (set! enable-module-registration (not (memq 'no-module-registration options)))
     (when (memq 'lambda-lift options) (set! do-lambda-lifting #t))
     (when (memq 'scrutinize options) (set! do-scrutinize #t))
     (when (memq 't debugging-chicken) (##sys#start-timer))
diff --git a/c-platform.scm b/c-platform.scm
index b98e8043..50f7d1bc 100644
--- a/c-platform.scm
+++ b/c-platform.scm
@@ -91,7 +91,7 @@
     no-procedure-checks-for-toplevel-bindings
     no-bound-checks no-procedure-checks-for-usual-bindings no-compiler-syntax
     no-parentheses-synonyms no-symbol-escape r5rs-syntax emit-all-import-libraries
-    setup-mode unboxing no-import-library) )
+    setup-mode unboxing no-module-registration) )
 
 (define valid-compiler-options-with-argument
   '(debug 
diff --git a/compiler-namespace.scm b/compiler-namespace.scm
index 28acca81..91c1ecff 100644
--- a/compiler-namespace.scm
+++ b/compiler-namespace.scm
@@ -203,7 +203,7 @@
  no-argc-checks
  no-bound-checks
  no-global-procedure-checks
- no-import-libraries
+ enable-module-registration
  no-procedure-checks
  node->sexpr
  non-foldable-bindings
diff --git a/compiler.scm b/compiler.scm
index d514140c..435909b0 100644
--- a/compiler.scm
+++ b/compiler.scm
@@ -328,7 +328,7 @@
 (define profiled-procedures #f)
 (define import-libraries '())
 (define all-import-libraries #f)
-(define no-import-libraries #f)
+(define enable-module-registration #t)
 (define standalone-executable #t)
 (define local-definitions #f)
 (define inline-locally #f)
@@ -828,11 +828,12 @@
 						(cond ((or all-import-libraries
 							   (assq name import-libraries) ) =>
 						       (lambda (il)
-							 (emit-import-lib name il)
+							 (when enable-module-registration
+							   (emit-import-lib name il))
 							 (values 
 							  (reverse xs)
 							  '((##core#undefined)))))
-						      (no-import-libraries
+						      ((not enable-module-registration)
 						       (values 
 							(reverse xs)
 							'((##core#undefined))))
diff --git a/csc.scm b/csc.scm
index 357660a2..1e8a8856 100644
--- a/csc.scm
+++ b/csc.scm
@@ -137,7 +137,7 @@
     -analyze-only -keep-shadowed-macros -inline-global -ignore-repository
     -no-symbol-escape -no-parentheses-synonyms -r5rs-syntax
     -no-argc-checks -no-bound-checks -no-procedure-checks -no-compiler-syntax
-    -emit-all-import-libraries -setup-mode -unboxing -no-elevation -no-import-library
+    -emit-all-import-libraries -setup-mode -unboxing -no-elevation -no-module-registration
     -no-procedure-checks-for-usual-bindings
     -no-procedure-checks-for-toplevel-bindings))
 
@@ -330,7 +330,7 @@ Usage: #{csc} FILENAME | OPTION ...
     -j -emit-import-library MODULE write compile-time module information into
                                     separate file
     -J -emit-all-import-libraries  emit import-libraries for all defined modules
-    -no-import-library             do not generate import library
+    -no-module-registration        do not generate module registration code
     -no-compiler-syntax            disable expansion of compiler-macros
 
   Translation options:
diff --git a/manual/Using the compiler b/manual/Using the compiler
index a1db00aa..c1bf4204 100644
--- a/manual/Using the compiler	
+++ b/manual/Using the compiler	
@@ -132,6 +132,8 @@ the source text should be read from standard input.
 
 ; -no-lambda-info : Don't emit additional information for each {{lambda}} expression (currently the argument-list, after alpha-conversion/renaming).
 
+; -no-module-registration : Do not generate module-registration code in the compiled code. This is only needed if you want to use an import library that is generated by other means (manually, for example).
+
 ; -no-parentheses-synonyms STYLE : Disables list delimiter synonyms, [..] and {...} for (...).
 
 ; -no-procedure-checks : disable procedure call checks
diff --git a/support.scm b/support.scm
index 60056fca..69a33726 100644
--- a/support.scm
+++ b/support.scm
@@ -1224,7 +1224,7 @@ Usage: chicken FILENAME OPTION ...
     -emit-import-library MODULE  write compile-time module information into
                                   separate file
     -emit-all-import-libraries   emit import-libraries for all defined modules
-    -no-import-library           do not generate import library
+    -no-module-registration      do not generate module registration code
     -no-compiler-syntax          disable expansion of compiler-macros
 
   Translation options:
Trap