| 176 | |
| 177 | @dataclass(slots=True, frozen=True) |
| 178 | class BuildTargetConfiguration: |
| 179 | arch: Architecture |
| 180 | os: OS |
| 181 | cpu: CPUType |
| 182 | compiler: Compiler |
| 183 | compiler_wrapper: str |
| 184 | name: str |
| 185 | |
| 186 | @staticmethod |
| 187 | def from_dict(d: dict) -> "BuildTargetConfiguration": |
| 188 | return BuildTargetConfiguration( |
| 189 | arch=Architecture(d["arch"]), |
| 190 | os=OS(d["os"]), |
| 191 | cpu=CPUType(d["cpu"]), |
| 192 | compiler=Compiler(d["compiler"]), |
| 193 | compiler_wrapper=d.get("compiler_wrapper", ""), |
| 194 | name=f"{d['arch']}-{d['os']}-{d['cpu']}-{d['compiler']}", |
| 195 | ) |
| 196 | |
| 197 | |
| 198 | @dataclass(slots=True, frozen=True) |