wasm flags update
Some checks failed
CI / build-test-release (push) Failing after 5m34s

This commit is contained in:
Jorijn van der Graaf 2026-07-22 18:25:39 +02:00
commit a25b0a1ded
5 changed files with 53 additions and 77 deletions

View file

@ -1,3 +1,6 @@
//SPDX-License-Identifier: LGPL-3.0-only
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
import std;
import Crafter.Build;
using namespace Crafter;
@ -30,6 +33,19 @@ int main() {
Check(cfg.mtune == "cortex-a72", "--mtune= should overwrite cfg.mtune");
}
// --sysroot= sets cfg.sysroot (cross-compiles against a foreign root,
// e.g. an Alpine aarch64 tree; also picked up by the std.cppm lookup
// and the qemu test-runner's QEMU_LD_PREFIX).
{
Configuration cfg;
std::array<std::string_view, 2> raw = {
"--target=aarch64-alpine-linux-musl", "--sysroot=/opt/alpine-aarch64",
};
ApplyStandardArgs(cfg, raw);
Check(cfg.sysroot == "/opt/alpine-aarch64", "--sysroot= should set cfg.sysroot");
Check(cfg.target == "aarch64-alpine-linux-musl", "--target= combines with --sysroot=");
}
// --lib promotes Executable -> LibraryStatic; --shared then promotes to Dynamic.
{
Configuration cfg;