From 571271c6a6300351366f04572c064d47231fbcd2 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 24 Oct 2022 00:27:54 +0000 Subject: [PATCH] ircd::gpt::pipe::code: Simplify source construction. --- ircd/gpt_pipe_code.cc | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/ircd/gpt_pipe_code.cc b/ircd/gpt_pipe_code.cc index b77f7292f..8c5de1a37 100644 --- a/ircd/gpt_pipe_code.cc +++ b/ircd/gpt_pipe_code.cc @@ -205,43 +205,18 @@ ircd::gpt::pipe::code::from_source(const string_view &comp_opts, if(!code_path) return {}; - if(!fs::is_reg(code_path)) - return {}; - - const fs::fd fd - { - code_path - }; - - const std::string read - { - fs::read(fd) - }; - - const string_view src - { - read - }; - - const vector_view srcs - ( - &src, 1 - ); - - char pbuf[1][48]; log::logf { log, log::level::DEBUG, - "source code `%s' %s comp_opts:%zu link_opts:%zu attempting...", + "source code `%s'comp_opts:%zu link_opts:%zu attempting...", code_path, - pretty(pbuf[0], si(size(read))), size(comp_opts), size(link_opts), }; cl::code ret { - srcs + cl::code::path, code_path }; ret.compile(comp_opts);