/* Crafter® Build Copyright (C) 2026 Catcrafts® Catcrafts.net This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3.0 as published by the Free Software Foundation; This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ module; #include "Crafter.Build-Api.h" export module Crafter.Build:Clang; import std; import :Shader; import :Interface; import :Implementation; import :External; namespace fs = std::filesystem; export namespace Crafter { struct BuildResult { std::string result; bool repack; std::unordered_set libs; // Compile flags (typically -I include paths) the dep wants its // consumers to see — sourced from its external dependencies' include // dirs so headers a dep exposes in its public modules are reachable // when a consumer #includes them directly. Propagates transitively. std::unordered_set publicCompileFlags; }; struct Define { std::string name; std::string value; }; // A browser-wasm codegen variant. The same wasm32 target is compiled more // than once, each pass adding `flags` to every translation unit, so newer // ISA features (relaxed SIMD today; threads, future SIMD revisions, … later) // can be adopted without dropping engines that lack them. Each non-empty // `label` emits an additional `outputName.