refactor: drop Windows host support
crafter-build is moving to a single Flatpak distribution, and there is no Windows host in that picture: no build.cmd, no MSVC or mingw host build, no DLL plus launcher. Delete every host-Windows path instead of leaving it to rot unverified: the cmd.exe command runner and quoting, the LOCALAPPDATA cache, the MSVC and mingw-host LoadProject variants with their LIBCXX_DIR and CRAFTER_MINGW_DIR plumbing, the winsock port probe, the LoadLibrary libclang loader, the console-width and isatty shims, and the preprocessor guards around the Linux bodies. The x86_64-w64-mingw32 cross-compile target stays. It is target logic (output names, -femulated-tls, the libstdc++ link extras, copying a dependency DLL next to a mingw exe, wine as the runner) and did not depend on any of the removed code. The msvc target goes with the host that was the only thing able to use it. Three target-path warts fixed on the way: ExpectedOutput named a mingw static library <name>.lib while the archive step wrote lib<name>.a, so those libraries relinked on every run; the import lib is no longer copied next to a mingw exe, since the dependency's own bin dir is already on the link line; and llvm-ar now writes every archive, not only the LTO ones, so Debug and Release archives are made the same way. CRAFTER_API and Crafter.Build-Api.h existed only for the DLL boundary. Nothing downstream used them, so they are removed rather than kept as an empty macro nobody can verify. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
f60ba809b5
commit
46082a3117
24 changed files with 138 additions and 1053 deletions
|
|
@ -1,8 +1,6 @@
|
|||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
module;
|
||||
#include "Crafter.Build-Api.h"
|
||||
export module Crafter.Build:External;
|
||||
import std;
|
||||
namespace fs = std::filesystem;
|
||||
|
|
@ -48,13 +46,13 @@ export namespace Crafter {
|
|||
// declaration and target — BuildExternal derives its own working directory
|
||||
// through this, so a caller that only needs to know where the headers ended
|
||||
// up cannot drift from where they actually are.
|
||||
CRAFTER_API fs::path ExternalCloneDir(const ExternalDependency& dep, std::string_view target);
|
||||
fs::path ExternalCloneDir(const ExternalDependency& dep, std::string_view target);
|
||||
// The -I flags this dependency contributes, from its declared includeDirs.
|
||||
// Also pure, which is what lets the linter's AST layer parse a source that
|
||||
// includes an external's headers without running a build to find out where
|
||||
// they are. The paths only resolve once something has fetched the clone.
|
||||
CRAFTER_API std::vector<std::string> ExternalIncludeFlags(const ExternalDependency& dep, std::string_view target);
|
||||
CRAFTER_API ExternalBuildResult BuildExternal(const ExternalDependency& dep, std::string_view target, std::atomic<bool>& cancelled);
|
||||
std::vector<std::string> ExternalIncludeFlags(const ExternalDependency& dep, std::string_view target);
|
||||
ExternalBuildResult BuildExternal(const ExternalDependency& dep, std::string_view target, std::atomic<bool>& cancelled);
|
||||
|
||||
// Specification for a sibling crafter-build project to fetch and depend on.
|
||||
// GitSource picks the revision: leave branch + commit empty for the
|
||||
|
|
@ -73,7 +71,7 @@ export namespace Crafter {
|
|||
// remote's project.cpp, and returns a stable Configuration* you can drop
|
||||
// into cfg.dependencies. The Configuration is owned by an internal cache
|
||||
// for the lifetime of the build; identical specs share one Configuration.
|
||||
CRAFTER_API Configuration* GitProject(const GitProjectSpec& spec);
|
||||
Configuration* GitProject(const GitProjectSpec& spec);
|
||||
|
||||
// Specification for a local sibling crafter-build project (e.g. an
|
||||
// example folder depending on its parent project, or a workspace where
|
||||
|
|
@ -87,7 +85,7 @@ export namespace Crafter {
|
|||
// cache copy. Resolves projectFile to its canonical absolute path and
|
||||
// recursively LoadProject's it. Returns a stable Configuration* owned
|
||||
// by the same internal cache as GitProject.
|
||||
CRAFTER_API Configuration* LocalProject(const LocalProjectSpec& spec);
|
||||
Configuration* LocalProject(const LocalProjectSpec& spec);
|
||||
|
||||
// Clone (or update) the given git source into the shared external
|
||||
// cache and return the path to the cloned working tree. Intended for
|
||||
|
|
@ -97,5 +95,5 @@ export namespace Crafter {
|
|||
// ExternalDependency / GitProject. Caching key = url + branch + commit;
|
||||
// identical calls reuse the existing clone. Pin `source.commit` to a
|
||||
// SHA for reproducible, offline-after-first-fetch builds.
|
||||
CRAFTER_API fs::path GitFetch(const GitSource& source);
|
||||
fs::path GitFetch(const GitSource& source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue