Skip to content

Commit

Permalink
libflux: make local connector built-in
Browse files Browse the repository at this point in the history
Problem: it's not very efficient to have to separately dlopen
the local connector when we could just build it in.

Build it in.
  • Loading branch information
garlick committed Oct 13, 2023
1 parent f6547f4 commit 6075019
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/common/libflux/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ libflux_la_SOURCES = \
handle.c \
connector_loop.c \
connector_interthread.c \
connector_local.c \
reactor.c \
reactor_private.h \
msg_handler.c \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int override_retry_count (struct usock_retry_params *retry)
return 0;
}

flux_t *connector_init (const char *path, int flags, flux_error_t *errp)
flux_t *connector_local_init (const char *path, int flags, flux_error_t *errp)
{
struct local_connector *ctx;

Expand Down
2 changes: 2 additions & 0 deletions src/common/libflux/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ flux_t *connector_loop_init (const char *uri, int flags, flux_error_t *errp);
flux_t *connector_interthread_init (const char *uri,
int flags,
flux_error_t *errp);
flux_t *connector_local_init (const char *uri, int flags, flux_error_t *errp);

static struct builtin_connector builtin_connectors[] = {
{ "loop", &connector_loop_init },
{ "interthread", &connector_interthread_init },
{ "local", &connector_local_init },
};

static void handle_trace (flux_t *h, const char *fmt, ...)
Expand Down
8 changes: 0 additions & 8 deletions src/connectors/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,12 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/common/libccan

fluxconnector_LTLIBRARIES = \
local.la \
ssh.la

connector_ldflags = -module $(san_ld_zdef_flag) \
-export-symbols-regex '^connector_init$$' \
--disable-static -avoid-version -shared -export-dynamic

local_la_SOURCES = \
local/local.c
local_la_LIBADD = \
$(top_builddir)/src/common/libflux-internal.la \
$(top_builddir)/src/common/libflux-core.la
local_la_LDFLAGS = $(connector_ldflags)

ssh_la_SOURCES = \
ssh/ssh.c
ssh_la_LIBADD = \
Expand Down

0 comments on commit 6075019

Please sign in to comment.