Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions include/daScript/ast/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,8 @@ namespace das
int32_t jit_size_level = 3u; // Opt level for LLVM for binary size
string jit_path_to_shared_lib; // Path to libDaScript. Optional, we'll try to find it in _das_root_/lib/ if not provided.
string jit_path_to_linker; // Path to linker. Optional, we'll use clang-cl from LLVM on Windows and cc otherwise.
// dll loading
vector<string> dll_search_paths; // additional search paths for dll loading
};

struct CommentReader : public ptr_ref_count {
Expand Down
15 changes: 14 additions & 1 deletion src/builtin/module_builtin_dasbind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,20 @@ FastCallWrapper getExtraWrapper ( int nargs, int res, int perm ) {
if ( !libhandle ) {
libhandle = loadDynamicLibrary(library.c_str());
if (!libhandle) {
libhandle = loadDynamicLibrary((getDasRoot() + "/" + library).c_str());
if ( *daScriptEnvironment::bound && (*daScriptEnvironment::bound)->g_Program ) {
for ( auto & root : (*daScriptEnvironment::bound)->g_Program->policies.dll_search_paths ) {
libhandle = loadDynamicLibrary((root + "/" + library).c_str());
if ( libhandle ) break;
}
/* // we figure this out later
if ( !libhandle ) {
libhandle = loadDynamicLibrary(((*daScriptEnvironment::bound)->g_Program->policies.jit_path_to_shared_lib + "/" + library).c_str());
}
*/
}
if ( !libhandle ) {
libhandle = loadDynamicLibrary((getDasRoot() + "/" + library).c_str());
}
}
}
g_dasBindLib[library] = libhandle;
Expand Down