-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This provides an in-base mechanism to handle chained library dependencies. In essence, the `LazyLibrary` object can be used anywhere a pointer to a library can be used (`dlopen`, `dlsym`, `ccall`, etc...) but it delays loading the library (and its recursive dependencies) until it is actually needed. This is the foundational piece needed to upgrade JLLs to lazily-load their libraries. In this new scheme, JLLs would generally lose all executable code and consist of nothing more than `LazyLibrary` definitions.
- Loading branch information
1 parent
53bcb39
commit 77a5027
Showing
12 changed files
with
241 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// This file is a part of Julia. License is MIT: https://julialang.org/license | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <complex.h> | ||
#include <stdint.h> | ||
#include <inttypes.h> | ||
|
||
#include "../src/support/platform.h" | ||
#include "../src/support/dtypes.h" | ||
|
||
// Borrow definition from `support/dtypes.h` | ||
#ifdef _OS_WINDOWS_ | ||
# define DLLEXPORT __declspec(dllexport) | ||
#else | ||
# if defined(_OS_LINUX_) && !defined(_COMPILER_CLANG_) | ||
// Clang and ld disagree about the proper relocation for STV_PROTECTED, causing | ||
// linker errors. | ||
# define DLLEXPORT __attribute__ ((visibility("protected"))) | ||
# else | ||
# define DLLEXPORT __attribute__ ((visibility("default"))) | ||
# endif | ||
#endif | ||
|
||
#ifdef _P64 | ||
#define jint int64_t | ||
#else | ||
#define jint int32_t | ||
#endif | ||
|
||
typedef struct { | ||
jint real; | ||
jint imag; | ||
} complex_t; | ||
|
||
// We expect this to come from `libccalltest` | ||
extern complex_t ctest(complex_t); | ||
|
||
DLLEXPORT complex_t dep_ctest(complex_t a) { | ||
return ctest(a); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.