tl-lang 0.4.6

A differentiable programming language with tensor support for machine learning
1
2
3
4
5
6
7
8
9
10
11
12
fn main() {
    // Prevent the linker from stripping #[no_mangle] extern "C" symbols
    // that are only referenced by LLVM JIT at runtime.
    // Without this, `cargo install` produces a binary that segfaults because
    // runtime symbols like tl_tensor_print, tl_tensor_acquire, etc. are
    // removed as "unused" by the linker.
    #[cfg(target_os = "linux")]
    println!("cargo:rustc-link-arg=-rdynamic");

    #[cfg(target_os = "macos")]
    println!("cargo:rustc-link-arg=-rdynamic");
}