(targets, dest_path: pathlib.Path)
| 241 | |
| 242 | |
| 243 | def write_target_settings(targets, dest_path: pathlib.Path): |
| 244 | dest_path.mkdir(parents=True, exist_ok=True) |
| 245 | |
| 246 | for triple, settings in targets.items(): |
| 247 | payload = {} |
| 248 | |
| 249 | for key in ("host_cc", "host_cxx", "target_cc", "target_cflags"): |
| 250 | payload[key] = settings.get(key) |
| 251 | |
| 252 | serialized_payload = json.dumps(payload, indent=4).encode("utf-8") |
| 253 | |
| 254 | write_if_different(dest_path / triple, serialized_payload) |
| 255 | |
| 256 | |
| 257 | class IntegrityError(Exception): |
no test coverage detected