compiler/stage1_py/l0_cli_build.py

Module l0_cli_build

Overview Symbols grouped by source file: compiler/stage1_py/l0_cli_build.py

Source: compiler/stage1_py/l0_cli_build.py Language: Python

Module Members

  • _find_cc: str | None l0_cli_build._find_cc() - Find the best available C compiler.
  • _compiler_flag_family: l0_cli_build._compiler_flag_family(str compiler) - Determine the compiler family for flag selection using a simple heuristic.
  • _is_windows_host: bool l0_cli_build._is_windows_host() - Return whether the current Python host is Windows.
  • _default_executable_name: str l0_cli_build._default_executable_name() - Return the default build output name for the current platform.
  • _runtime_include_flags: list[str] l0_cli_build._runtime_include_flags(str flag_family, str runtime_include) - Return compiler-family-specific runtime include flags.
  • _runtime_library_flags: list[str] l0_cli_build._runtime_library_flags(str flag_family, str runtime_lib) - Return compiler-family-specific runtime library search-path flags.
  • _output_flags: list[str] l0_cli_build._output_flags(str flag_family, Path exe_path) - Return compiler-family-specific output flags.
  • _validated_temporary_directory: Path l0_cli_build._validated_temporary_directory() - Resolve and validate the host temporary directory.
  • _emit_temporary_source_cleanup_failure: None l0_cli_build._emit_temporary_source_cleanup_failure(Path c_path) - Report a compiler-temporary source retained after failed cleanup.
  • _remove_temporary_c_source: bool l0_cli_build._remove_temporary_c_source(Path c_path) - Remove a generated-C temporary and report retained recovery state.
  • _write_temporary_c_source: Path l0_cli_build._write_temporary_c_source(str c_code) - Atomically create and write one anonymous generated-C source.
  • _check_entry_main_for_build: bool l0_cli_build._check_entry_main_for_build(AnalysisResult result, str entry_name) - Check that the entry module defines a valid 'main' function for build/run.
  • _validate_runtime_library_path: bool l0_cli_build._validate_runtime_library_path(str runtime_lib_path) - Validate that the provided runtime library path exists and is a directory.
  • _split_c_options: list[str] l0_cli_build._split_c_options(str|None raw_options) - Split a raw C options string into individual compiler arguments.
  • _get_optimize_flag: str | None l0_cli_build._get_optimize_flag(str flag_family, list[str] extra_opts) - Determine the appropriate optimization flag for the compiler family.
  • _compile_generated_c: int l0_cli_build._compile_generated_c(argparse.Namespace args, CompilationContext context, Path c_path, Path exe_path) - Invoke the selected host compiler for one generated-C source.
  • cmd_build: int l0_cli_build.cmd_build(argparse.Namespace args) - Build an executable from an L0 module.
  • cmd_run: int l0_cli_build.cmd_run(argparse.Namespace args) - Build and run an L0 module.