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,21 +1,5 @@
/*
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
*/
//SPDX-License-Identifier: LGPL-3.0-only
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
module;
export module Crafter.Build:Test_impl;
@ -298,7 +282,13 @@ TestRunner TestRunner::ForTarget(const Configuration& cfg) {
// which execvp's its argument list directly without going through a
// shell. A bare VAR=value would be exec'd as a command path and
// fail with "No such file or directory".
r.exec = std::format("env QEMU_LD_PREFIX={} {}", cfg.sysroot, r.exec);
// QEMU_LD_PREFIX only redirects the ELF interpreter lookup; the
// emulated loader then searches ITS default paths against the
// host filesystem, picking up host-arch libraries from /lib —
// LD_LIBRARY_PATH steers it back into the sysroot.
r.exec = std::format(
"env QEMU_LD_PREFIX={0} LD_LIBRARY_PATH={0}/lib:{0}/usr/lib {1}",
cfg.sysroot, r.exec);
}
return r;
}
@ -474,6 +464,7 @@ TestBuilder Configuration::AddTest(std::string_view name, std::span<fs::path> in
t.config.target = this->target;
t.config.march = this->march;
t.config.mtune = this->mtune;
t.config.sysroot = this->sysroot;
t.config.debug = this->debug;
t.config.type = ConfigurationType::Executable;
@ -499,6 +490,7 @@ void Configuration::AddMarchVariants(std::string_view name,
t.config.target = this->target;
t.config.march = tier.march;
t.config.mtune = tier.mtune;
t.config.sysroot = this->sysroot;
t.config.debug = this->debug;
t.config.type = ConfigurationType::Executable;