           ;; (js/React...) will otherwise just work without externs
           (.setWarningLevel DiagnosticGroups/UNDEFINED_VARIABLES CheckLevel/WARNING))]
 
-    (set-options closure-opts compiler-options)
+    (set-options closure-opts compiler-options state)
 
     (when source-map?
       ;; FIXME: path is not used at all but needs to be set


        closure-opts
        (doto (make-options)
          (set-options co-opts)
          (.resetWarningsGuard)

          (.setStrictModeInput false)


        co
        (doto (make-options)
          (set-options co-opts state))

        co
        (if (false? (get-in state [:compiler-options :rewrite-polyfills]))
