Skip to content

Commit

Permalink
Added dedicated configure flag for enabling MCJIT
Browse files Browse the repository at this point in the history
This makes it possible to enable MCJIT even when using LLVM versions
prior to 3.6. If LLVM 3.6 is used MCJIT usage is enabled automatically.
  • Loading branch information
Yorick Peterse committed Apr 29, 2015
1 parent fe796fd commit f082628
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Configure
@llvm_shared_objs = nil
@llvm_cxxflags = ""
@llvm_ldflags = ""
@llvm_mcjit = false

# System settings
@libc = nil
Expand Down Expand Up @@ -349,6 +350,10 @@ class Configure
@llvm_shared = true
end

o.on "--llvm-mcjit", "Use LLVM with MCJIT" do
@llvm_mcjit = true
end

o.doc "\n System settings"

o.on "--with-include-dir", "DIR", "Add DIR to the default include search paths" do |dir|
Expand Down Expand Up @@ -612,6 +617,11 @@ class Configure
setup_llvm_shared
end

# Old JIT API is no longer available as of LLVM 3.6
if @llvm_api_version >= 306
@llvm_mcjit = true
end

return true
end
else
Expand Down Expand Up @@ -1585,7 +1595,7 @@ int main() { return tgetnum(""); }
#define RBX_LDSHAREDXX "#{@ldsharedxx}"
#define RBX_SIZEOF_LONG #{sizeof("long")}
#define RBX_LLVM_API_VER #{@llvm_api_version}
#define RBX_LLVM_USE_MCJIT #{@llvm_api_version >= 306}
#define RBX_LLVM_USE_MCJIT #{@llvm_mcjit}
#define RBX_LIBC "#{@libc}"
#define RBX_HAVE_LCHMOD #{@have_lchmod}
#define RBX_HAVE_LCHOWN #{@have_lchown}
Expand Down

0 comments on commit f082628

Please sign in to comment.