You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: build.rs
    path of file: ./repos/FireDBG.for.Rust/codelldb/adapter/crates/lldb
    
    the code of the file until where you have to start completion: use std::{env, fs, path::Path};

pub type Error = Box<dyn std::error::Error>;

fn main() -> Result<(), Error> {
    let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
    let weak_linkage = match env::var("CARGO_FEATURE_WEAK_LINKAGE") {
        Ok(_) => true,
        Err(_) => false,
    };

    // Rebuild if any source files change
    rerun_if_changed_in(Path::new("src"))?;

    let mut build_config = cpp_build::Config::new();

    if weak_linkage {
        build_config.cpp_set_stdlib(None);
    } else {
        // This branch is used when building test runners
        set_rustc_link_search();
        set_dylib_search_path();
        if target_os == "windows" 
    
fn main() -> Result<(), Error> {
    let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
    let weak_linkage = match env::var("CARGO_FEATURE_WEAK_LINKAGE") {
        Ok(_) => true,
        Err(_) => false,
    };

    // Rebuild if any source files change
    rerun_if_changed_in(Path::new("src"))?;

    let mut build_config = cpp_build::Config::new();

    if weak_linkage {
        build_config.cpp_set_stdlib(None);
    } else {
        // This branch is used when building test runners
        set_rustc_link_search();
        set_dylib_search_path();
        if target_os == "windows" {
            println!("cargo:rustc-link-lib=dylib=liblldb");
        } else {
            build_config.cpp_set_stdlib(Some("c++"));
            println!("cargo:rustc-link-lib=dylib=lldb");
            if target_os == "linux" {
                // Require all symbols to be defined in test runners
                println!("cargo:rustc-link-arg=--no-undefined");
            }
        }
    }

    // Generate C++ bindings
    build_config.include("include");
    build_config.build("src/lib.rs");

    Ok(())
}