From 8f60d4195d6fe703ec4d19bcf06162ea8fc548a4 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 9 Feb 2024 04:14:26 +0000 Subject: driver: move the host params logic to its own translation unit. --- src/internal/slibtool_driver_impl.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/internal/slibtool_driver_impl.h') diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h index c72f19e..32ae6c8 100644 --- a/src/internal/slibtool_driver_impl.h +++ b/src/internal/slibtool_driver_impl.h @@ -141,6 +141,12 @@ struct slbt_driver_ctx_impl { struct slbt_error_info erribuf[64]; }; +struct slbt_driver_ctx_alloc { + struct argv_meta * meta; + struct slbt_driver_ctx_impl ctx; + uint64_t guard; +}; + struct slbt_exec_ctx_impl { int argc; char * args; @@ -162,6 +168,31 @@ struct slbt_archive_ctx_impl { struct slbt_archive_ctx actx; }; + +int slbt_init_host_params( + const struct slbt_driver_ctx * dctx, + const struct slbt_common_ctx * cctx, + struct slbt_host_strs * drvhost, + struct slbt_host_params * host, + struct slbt_host_params * cfgmeta, + const char * cfgmeta_ar, + const char * cfgmeta_ranlib); + + +void slbt_free_host_params(struct slbt_host_strs * host); + + +void slbt_init_flavor_settings( + struct slbt_common_ctx * cctx, + const struct slbt_host_params * ahost, + struct slbt_flavor_settings * psettings); + + +int slbt_init_ldrpath( + struct slbt_common_ctx * cctx, + struct slbt_host_params * host); + + static inline struct slbt_archive_ctx_impl * slbt_get_archive_ictx(const struct slbt_archive_ctx * actx) { uintptr_t addr; -- cgit v1.2.3