This commit is contained in:
parent
7ff426b2f0
commit
a25b0a1ded
5 changed files with 53 additions and 77 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue