Add a way to demangle C++ symbols
[scilab.git] / scilab / modules / jit / Makefile.am
index d89b642..08ff6fc 100644 (file)
@@ -16,7 +16,10 @@ JIT_CPP_SOURCES = \
        src/cpp/jitter.cpp
 
 GATEWAY_CPP_SOURCES =   \
-sci_gateway/cpp/sci_runASTwithVMKit.cpp
+       sci_gateway/cpp/jit_gw.cpp \
+    sci_gateway/cpp/sci_enableJIT.cpp \
+    sci_gateway/cpp/sci_disableJIT.cpp \
+    sci_gateway/cpp/sci_isJIT.cpp
 
 libscijit_la_CPPFLAGS = \
        -Iincludes \
@@ -68,5 +71,10 @@ testControlExp_SOURCES       = src/cpp/testControlExp.cpp
 testControlExp_CXXFLAGS = $(check_INCLUDES)
 testControlExp_LDADD   = $(check_LDADD)
 
+# This target transforms a basic code to llvm + clang code for the JIT
+BUILT_SOURCES = src/cpp/llvm-wrapper-generated.cpp
+src/cpp/llvm-wrapper-generated.cpp: src/cpp/llvm-wrapper.cpp
+       clang++ -emit-llvm  -I$(top_srcdir)/modules/types/includes/ -I$(top_srcdir)/modules/operations/includes/ -I$(top_srcdir)/modules/core/includes/  -I$(top_srcdir)/modules/ast/includes/ -I$(top_srcdir)/modules/localization/includes/ -I$(top_srcdir)/modules/symbol/includes/ -I$(top_srcdir)/modules/dynamic_link/includes/ $(EIGEN_CPPFLAGS) -c src/cpp/llvm-wrapper.cpp -o - |  llc-3.3 -march=cpp -cppgen=contents -o - | perl src/perl/demangle.pl > src/cpp/llvm-wrapper-generated.cpp || exit 1
+
 include $(top_srcdir)/Makefile.incl.am