@@ -25,10 +25,12 @@ public class Compile{
25
25
private static final String PATH_PROP = "clojure.compile.path" ;
26
26
private static final String REFLECTION_WARNING_PROP = "clojure.compile.warn-on-reflection" ;
27
27
private static final String UNCHECKED_MATH_PROP = "clojure.compile.unchecked-math" ;
28
+ private static final String LOCALS_CLEARING_PROP = "clojure.compile.locals-clearing" ;
28
29
private static final Var compile_path = RT .var ("clojure.core" , "*compile-path*" );
29
30
private static final Var compile = RT .var ("clojure.core" , "compile" );
30
31
private static final Var warn_on_reflection = RT .var ("clojure.core" , "*warn-on-reflection*" );
31
32
private static final Var unchecked_math = RT .var ("clojure.core" , "*unchecked-math*" );
33
+ private static final Var compiler_options = RT .var ("clojure.core" , "*compiler-options*" );
32
34
33
35
public static void main (String [] args ) throws IOException {
34
36
@@ -47,10 +49,15 @@ public static void main(String[] args) throws IOException{
47
49
48
50
boolean warnOnReflection = System .getProperty (REFLECTION_WARNING_PROP , "false" ).equals ("true" );
49
51
boolean uncheckedMath = System .getProperty (UNCHECKED_MATH_PROP , "false" ).equals ("true" );
52
+ boolean localsClearing = System .getProperty (LOCALS_CLEARING_PROP , "true" ).equals ("true" );
50
53
51
54
try
52
55
{
53
- Var .pushThreadBindings (RT .map (compile_path , path , warn_on_reflection , warnOnReflection , unchecked_math , uncheckedMath ));
56
+ Var .pushThreadBindings (RT .map (compile_path , path ,
57
+ warn_on_reflection , warnOnReflection ,
58
+ unchecked_math , uncheckedMath ,
59
+ compiler_options ,
60
+ ((PersistentHashMap )compiler_options .deref ()).assoc (RT .localsClearing , localsClearing )));
54
61
55
62
for (String lib : args )
56
63
{
0 commit comments