|
27 | 27 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
28 | 28 | # SUCH DAMAGE.
|
29 | 29 | #
|
| 30 | +import inspect |
30 | 31 | import os
|
31 | 32 | import re
|
32 | 33 | import shutil
|
|
51 | 52 | )
|
52 | 53 | from .simple_project import BoolConfigOption, SimpleProject, _cached_get_homebrew_prefix
|
53 | 54 | from ..config.compilation_targets import BaremetalFreestandingTargetInfo, CompilationTargets
|
| 55 | +from ..config.config_loader_base import ConfigOptionHandle |
54 | 56 | from ..processutils import get_program_version
|
55 | 57 | from ..utils import OSInfo
|
56 | 58 |
|
@@ -298,10 +300,8 @@ def setup(self):
|
298 | 300 | "If you really don't need QEMU host shares you can disable the samba dependency "
|
299 | 301 | "by setting --" + self.target + "/no-use-smbd",
|
300 | 302 | )
|
301 |
| - |
302 | 303 | self.configure_args.extend(
|
303 | 304 | [
|
304 |
| - "--target-list=" + self.qemu_targets, |
305 | 305 | "--disable-xen",
|
306 | 306 | "--disable-docs",
|
307 | 307 | "--disable-rdma",
|
@@ -338,6 +338,17 @@ def configure(self, **kwargs):
|
338 | 338 | self.configure_args.append("--enable-slirp")
|
339 | 339 | else:
|
340 | 340 | self.configure_args.append("--enable-slirp=git")
|
| 341 | + |
| 342 | + chosen_targets = self.qemu_targets |
| 343 | + qemu_targets_option = typing.cast(ConfigOptionHandle, inspect.getattr_static(self, "qemu_targets")) |
| 344 | + if qemu_targets_option.is_default_value: |
| 345 | + if (self.source_dir / "configs/targets/riscv32cheristd-softmmu.mak").exists(): |
| 346 | + chosen_targets += ",riscv32cheristd-softmmu,riscv64cheristd-softmmu" |
| 347 | + # Use the new xcheri targets if available: |
| 348 | + if (self.source_dir / "configs/targets/riscv32xcheri-softmmu.mak").exists(): |
| 349 | + chosen_targets = chosen_targets.replace("riscv32cheri-softmmu", "riscv32xcheri-softmmu") |
| 350 | + chosen_targets = chosen_targets.replace("riscv64cheri-softmmu", "riscv64xcheri-softmmu") |
| 351 | + self.configure_args.append("--target-list=" + chosen_targets) |
341 | 352 | super().configure(**kwargs)
|
342 | 353 |
|
343 | 354 | def run_tests(self):
|
|
0 commit comments