Load build flags from build_flags.toml via ci.wasm_flags. Args: mode: Build mode (debug, fast_debug, quick, release) target: Target type (library, sketch, link) Returns: Dictionary with 'defines', 'compiler_flags', 'link_flags' lists Rai
(self, mode: str, target: str)
| 232 | return "unknown" |
| 233 | |
| 234 | def load_build_flags(self, mode: str, target: str) -> dict[str, list[str]]: |
| 235 | """Load build flags from build_flags.toml via ci.wasm_flags. |
| 236 | |
| 237 | Args: |
| 238 | mode: Build mode (debug, fast_debug, quick, release) |
| 239 | target: Target type (library, sketch, link) |
| 240 | |
| 241 | Returns: |
| 242 | Dictionary with 'defines', 'compiler_flags', 'link_flags' lists |
| 243 | |
| 244 | Raises: |
| 245 | FileNotFoundError: If build_flags.toml doesn't exist |
| 246 | """ |
| 247 | from ci.wasm_flags import ( |
| 248 | get_lib_compile_flags_dict, |
| 249 | get_sketch_compile_flags_dict, |
| 250 | ) |
| 251 | |
| 252 | if target == "library": |
| 253 | d = get_lib_compile_flags_dict(mode) |
| 254 | return { |
| 255 | "defines": d["defines"], |
| 256 | "compiler_flags": d["compiler_flags"], |
| 257 | "link_flags": [], |
| 258 | } |
| 259 | elif target == "sketch": |
| 260 | d = get_sketch_compile_flags_dict(mode) |
| 261 | return { |
| 262 | "defines": d["defines"], |
| 263 | "compiler_flags": d["compiler_flags"], |
| 264 | "link_flags": [], |
| 265 | } |
| 266 | elif target == "link": |
| 267 | d = get_sketch_compile_flags_dict(mode) |
| 268 | return { |
| 269 | "defines": d["defines"], |
| 270 | "compiler_flags": d["compiler_flags"], |
| 271 | "link_flags": d["link_flags"], |
| 272 | } |
| 273 | else: |
| 274 | raise ValueError(f"Unknown target: {target}") |
| 275 | |
| 276 | def get_include_paths(self) -> list[str]: |
| 277 | """Get WASM-specific include paths. |
nothing calls this directly
no test coverage detected