Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2da048b
Add --jit option to execute without creation of executable file
Vipul-Cariappa Feb 29, 2024
5a96c18
execute global_init & global_stmts after checking their existence
Vipul-Cariappa Mar 8, 2024
8a0a847
CI fix & raise error for non-llvm backend with jit
Vipul-Cariappa Mar 8, 2024
895ae8f
combined `compile_python_to_object_file` and `execute_python_using_ji…
Vipul-Cariappa Mar 9, 2024
8659948
Add testing mechanism
Vipul-Cariappa Mar 10, 2024
602359a
Testing with cpython and symengine
Vipul-Cariappa Mar 19, 2024
4ae8463
skipping jit tests with external dependency
Vipul-Cariappa Mar 23, 2024
c138728
skipping testing JIT that depend on syms or cpython
Vipul-Cariappa Mar 23, 2024
31b4d02
support to use cpython and symengine with JIT
Vipul-Cariappa Mar 24, 2024
f1cd329
Trigger CI/CD
Vipul-Cariappa Mar 24, 2024
caec554
windows fix
Vipul-Cariappa Mar 24, 2024
ed6dd6e
WASM ci fix
Vipul-Cariappa Mar 24, 2024
3be9723
allow few tests to fail under `--jit`
Vipul-Cariappa Apr 1, 2024
ca42626
fix for #2595
Vipul-Cariappa Apr 4, 2024
4fdfe04
factored out loading cpython and symengine libraries
Vipul-Cariappa Apr 4, 2024
cbac670
wasm related fix
Vipul-Cariappa Apr 4, 2024
a35dc02
windows ci fix
Vipul-Cariappa Apr 4, 2024
f6f62b9
windows ci fix
Vipul-Cariappa Apr 4, 2024
ff5ac20
windows ci fix
Vipul-Cariappa Apr 4, 2024
ea044d5
updated for consistency
Vipul-Cariappa Apr 16, 2024
5ae201e
updated for consistency
Vipul-Cariappa Apr 17, 2024
6d9432b
Apply suggestions from code review
Vipul-Cariappa Apr 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wasm related fix
  • Loading branch information
Vipul-Cariappa committed Apr 20, 2024
commit cbac6708028a538790a673b45f2fb2509441cbb7
4 changes: 4 additions & 0 deletions src/lpython/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ bool path_exists(std::string path) {
}
}

#ifdef HAVE_LFORTRAN_LLVM

void open_cpython_library(DynamicLibrary &l) {
std::string conda_prefix = std::getenv("CONDA_PREFIX");
#if defined (__linux__)
Expand Down Expand Up @@ -174,6 +176,8 @@ void close_symengine_library(DynamicLibrary &l) {
#endif
}

#endif

// Decodes the exit status code of the process (in Unix)
// See `WEXITSTATUS` for more information.
// https://stackoverflow.com/a/27117435/15913193
Expand Down
15 changes: 10 additions & 5 deletions src/lpython/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@
#include <string>
#include <libasr/utils.h>

#ifdef HAVE_LFORTRAN_LLVM
#if (defined (__linux__)) or (defined (__APPLE__))
#include <dlfcn.h>
#elif (defined (WIN32))
#include <windows.h>
#endif
#endif

namespace LCompilers::LPython {

void get_executable_path(std::string &executable_path, int &dirname_length);
std::string get_runtime_library_dir();
std::string get_runtime_library_header_dir();
bool is_directory(std::string path);
bool path_exists(std::string path);

#ifdef HAVE_LFORTRAN_LLVM
union DynamicLibrary {
#if (defined (__linux__)) or (defined (__APPLE__))
void *l;
Expand All @@ -20,15 +29,11 @@ union DynamicLibrary {
#endif
};

void get_executable_path(std::string &executable_path, int &dirname_length);
std::string get_runtime_library_dir();
std::string get_runtime_library_header_dir();
bool is_directory(std::string path);
bool path_exists(std::string path);
void open_cpython_library(DynamicLibrary &l);
void close_cpython_library(DynamicLibrary &l);
void open_symengine_library(DynamicLibrary &l);
void close_symengine_library(DynamicLibrary &l);
#endif

// Decodes the exit status code of the process (in Unix)
int32_t get_exit_status(int32_t err);
Expand Down