Skip to content

Commit 1ef228e

Browse files
committed
Add list of exported symbols to lbt_config_t
1 parent 765628e commit 1ef228e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/config.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "libblastrampoline_internal.h"
2+
#include "exported_funcs.inc"
23

34
lbt_config_t lbt_config;
45

@@ -20,6 +21,9 @@ LBT_DLLEXPORT const lbt_config_t * lbt_get_config() {
2021
lbt_config.build_flags |= LBT_BUILDFLAGS_F2C_CAPABLE;
2122
#endif
2223

24+
lbt_config.exported_symbols = (const char **)&exported_func_names[0];
25+
lbt_config.num_exported_symbols = NUM_EXPORTED_FUNCS;
26+
2327
return &lbt_config;
2428
}
2529

src/libblastrampoline.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ typedef struct {
6767
// Flags that describe this `libblastrampoline`'s build configuration.
6868
// See `LBT_BUILDFLAGS_XXX` below.
6969
uint32_t build_flags;
70+
// The names of the symbols that we export. We do not list both `dgemm_` and `dgemm_64_`, just `dgemm_`.
71+
const char ** exported_symbols;
72+
uint32_t num_exported_symbols;
7073
} lbt_config_t;
7174

7275
// Possible values for `build_flags` in `lbt_config_t`

test/utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ const LBT_F2C_PLAIN = 0
9595
struct lbt_config_t
9696
loaded_libs::Ptr{Ptr{lbt_library_info_t}}
9797
build_flags::UInt32
98+
exported_symbols::Ptr{Cstring}
99+
num_exported_symbols::UInt32
98100
end
99101
const LBT_BUILDFLAGS_F2C_CAPABLE = 0x02
100102

0 commit comments

Comments
 (0)