diff --git a/seL4-platforms/builds.py b/seL4-platforms/builds.py index f1e563f3..97e8164e 100644 --- a/seL4-platforms/builds.py +++ b/seL4-platforms/builds.py @@ -101,7 +101,8 @@ def get_mode(self) -> Optional[int]: def settings_args(self): """Return the build settings as an argument list [-Dkey=val]""" - return [f"-D{key}={val}" for (key, val) in self.settings.items()] + all_settings = {**self.settings, **self.get_platform().settings} + return [f"-D{key}={val}" for (key, val) in all_settings.items()] def set_verification(self): """Make this a verification build""" diff --git a/seL4-platforms/platforms.py b/seL4-platforms/platforms.py index ef45777d..fccab798 100644 --- a/seL4-platforms/platforms.py +++ b/seL4-platforms/platforms.py @@ -57,6 +57,7 @@ def __init__(self, name: str, entries: dict): self.req = None self.no_hw_test = False self.no_hw_build = False + self.settings = {} self.__dict__.update(**entries) if not self.validate(): raise ValidationException(f"Platform {name} validation") @@ -109,6 +110,7 @@ def __repr__(self): f" req: {self.req}", f" no_hw_test: {self.no_hw_test}", f" no_hw_build: {self.no_hw_build}", + f" settings: {self.settings}", " }" ]]) return result.getvalue() @@ -158,6 +160,9 @@ def toolchain_arch_str(self) -> str: def cmake_toolchain_setting(self, mode: int) -> str: return self.toolchain_arch_str() + str(mode) + def settings(self) -> str: + return self.settings + def get_image_platform(self, mode: int) -> str: return self.image_platform or self.get_platform(mode)