Skip to main content

run_link_plan

Function run_link_plan 

Source
pub async fn run_link_plan(
    plan: &LinkPlan,
    linker_path: &Path,
    cwd: &Path,
) -> Result<PathBuf>
Expand description

Spawn the linker driver with plan.args from cwd. On success, returns the path of the produced shared object (= plan.output).

linker_path is typically the same cc/clang rustc would use. On macOS, xcrun -f clang resolves to the active toolchain’s driver. On Linux/Android, the NDK ships a per-API-level wrapper (e.g. aarch64-linux-android21-clang).