Skip to content
Browse files

CLJS-592 - preserve :macro metadata to enable AOT compilation

  • Loading branch information...
1 parent 070b677 commit f7f6517d196bca522e1b6e9a1f2218a87df69e69 @frenchy64 frenchy64 committed with swannodette Feb 4, 2014
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/clj/cljs/core.clj
7 src/clj/cljs/core.clj
@@ -1,4 +1,4 @@
-; Copyright (c) Rich Hickey. All rights reserved.
Clojure member
Bronsa added a note Feb 4, 2014

This should be restored

Clojure member
swannodette added a note Feb 4, 2014

Oops done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (
; which can be found in the file epl-v10.html at the root of this distribution.
@@ -45,7 +45,10 @@
vars (map #(ns-resolve ns %) vars)
syms (map (core/fn [^clojure.lang.Var v] (core/-> v .sym (with-meta {:macro true}))) vars)
defs (map (core/fn [sym var]
- `(def ~sym (deref ~var))) syms vars)]
+ `(do (def ~sym (deref ~var))
+ ;for AOT compilation
+ (alter-meta! (var ~sym) assoc :macro true)))
+ syms vars)]
`(do ~@defs

0 comments on commit f7f6517

Please sign in to comment.
Something went wrong with that request. Please try again.