Skip to content

Commit f082628

Browse files
author
Yorick Peterse
committedApr 29, 2015
Added dedicated configure flag for enabling MCJIT
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.
1 parent fe796fd commit f082628

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
 

Diff for: ‎configure

+11-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class Configure
6868
@llvm_shared_objs = nil
6969
@llvm_cxxflags = ""
7070
@llvm_ldflags = ""
71+
@llvm_mcjit = false
7172

7273
# System settings
7374
@libc = nil
@@ -349,6 +350,10 @@ class Configure
349350
@llvm_shared = true
350351
end
351352

353+
o.on "--llvm-mcjit", "Use LLVM with MCJIT" do
354+
@llvm_mcjit = true
355+
end
356+
352357
o.doc "\n System settings"
353358

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

620+
# Old JIT API is no longer available as of LLVM 3.6
621+
if @llvm_api_version >= 306
622+
@llvm_mcjit = true
623+
end
624+
615625
return true
616626
end
617627
else
@@ -1585,7 +1595,7 @@ int main() { return tgetnum(""); }
15851595
#define RBX_LDSHAREDXX "#{@ldsharedxx}"
15861596
#define RBX_SIZEOF_LONG #{sizeof("long")}
15871597
#define RBX_LLVM_API_VER #{@llvm_api_version}
1588-
#define RBX_LLVM_USE_MCJIT #{@llvm_api_version >= 306}
1598+
#define RBX_LLVM_USE_MCJIT #{@llvm_mcjit}
15891599
#define RBX_LIBC "#{@libc}"
15901600
#define RBX_HAVE_LCHMOD #{@have_lchmod}
15911601
#define RBX_HAVE_LCHOWN #{@have_lchown}

0 commit comments

Comments
 (0)