<commit_before>use std::process::Command;
use std::env;

fn main() {
    let mut path = match env::var("WELD_HOME") {
        Ok(val) => val,
        Err(_) => "..".to_string(),
    };

    if path.chars().last().unwrap() != '/' {
        path = path + &"/";
    }

    let cpp_path = path + &"weld_rt/cpp";

    Command::new("make").arg("clean").arg("-C").arg(cpp_path.clone()).status().unwrap();
    Command::new("make").arg("-C").arg(cpp_path.clone()).status().unwrap();
    println!("{}", format!("cargo:rustc-link-search=native={}", cpp_path));

    let target = env::var("TARGET").unwrap();
    if target == "x86_64-apple-darwin" {
        let libs = vec!["z", "c++"];
        for lib in libs {
            println!("cargo:rustc-link-lib={}", lib);
        }
    }
}<commit_msg>Add stdc++ for building weld_rt on linux (#91)<commit_after>use std::process::Command;
use std::env;

fn main() {
    let mut path = match env::var("WELD_HOME") {
        Ok(val) => val,
        Err(_) => "..".to_string(),
    };

    if path.chars().last().unwrap() != '/' {
        path = path + &"/";
    }

    let cpp_path = path + &"weld_rt/cpp";

    Command::new("make").arg("clean").arg("-C").arg(cpp_path.clone()).status().unwrap();
    Command::new("make").arg("-C").arg(cpp_path.clone()).status().unwrap();
    println!("{}", format!("cargo:rustc-link-search=native={}", cpp_path));

    let target = env::var("TARGET").unwrap();
    if target == "x86_64-apple-darwin" {
        let libs = vec!["z", "c++"];
        for lib in libs {
            println!("cargo:rustc-link-lib={}", lib);
        }
    }
    else if target == "x86_64-unknown-linux-gnu" {
        let libs = vec!["z", "stdc++"];
        for lib in libs {
            println!("cargo:rustc-link-lib={}", lib);
        }
    }
}
{'fraction_non_alphanumeric': 0.24105145413870246, 'fraction_numerical': 0.007829977628635347, 'mean_word_length': 2.688659793814433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4465097', 'n_tokens_mistral': 647, 'n_tokens_neox': 639, 'n_words': 109}