@@ -29,7 +29,6 @@ static class Compile
2929 const string PATH_PROP = "CLOJURE_COMPILE_PATH" ;
3030 const string REFLECTION_WARNING_PROP = "CLOJURE_COMPILE_WARN_ON_REFLECTION" ;
3131 const string UNCHECKED_MATH_PROP = "CLOJURE_COMPILE_UNCHECKED_MATH" ;
32- const string ELIDE_META_PROP = "CLOJURE_ELIDE_META" ;
3332
3433 static void Main ( string [ ] args )
3534 {
@@ -54,15 +53,27 @@ static void Main(string[] args)
5453 bool warnOnReflection = warnVal == null ? false : warnVal . Equals ( "true" ) ;
5554 string mathVal = Environment . GetEnvironmentVariable ( UNCHECKED_MATH_PROP ) ;
5655 bool uncheckedMath = mathVal == null ? false : mathVal . Equals ( "true" ) ;
57- object elide = RT . readString ( Environment . GetEnvironmentVariable ( ELIDE_META_PROP ) ?? "nil" ) ;
56+
57+ object compilerOptions = null ;
58+ foreach ( DictionaryEntry kv in Environment . GetEnvironmentVariables ( ) )
59+ {
60+ String name = ( String ) kv . Key ;
61+ String v = ( String ) kv . Value ;
62+ if ( name . StartsWith ( "CLOJURE_COMPILER_" ) )
63+ {
64+ compilerOptions = RT . assoc ( compilerOptions
65+ , RT . keyword ( null , name . Substring ( 1 + name . LastIndexOf ( '_' ) ) )
66+ , RT . readString ( v ) ) ;
67+ }
68+ }
5869
5970 try
6071 {
6172 Var . pushThreadBindings ( RT . map (
6273 Compiler . CompilePathVar , path ,
6374 RT . WarnOnReflectionVar , warnOnReflection ,
6475 RT . UncheckedMathVar , uncheckedMath ,
65- Compiler . ElideMetaVar , elide
76+ Compiler . CompilerOptionsVar , compilerOptions
6677 ) ) ;
6778
6879 Stopwatch sw = new Stopwatch ( ) ;
0 commit comments