blob: 9684bf1b186e4da1fbd5908dd146fe224db797e3 [file] [log] [blame]
toolchain("rust") {
outfile = "{{target_out_dir}}/{{rustc_output_prefix}}{{crate_name}}{{rustc_output_extension}}"
tool("rustc") {
depfile = "{{target_out_dir}}/{{crate_name}}.d"
command = "rustc --crate-name {{crate_name}} {{source}} --crate-type {{crate_type}} --emit=dep-info=$depfile,link {{rustflags}} -o $outfile {{rustdeps}} {{externs}}"
description = "RUST $outfile"
cdylib_output_extension = ".so"
proc_macro_output_extension = ".so"
outputs = [
outfile,
]
}
tool("stamp") {
command = "touch {{output}}"
description = "STAMP {{output}}"
}
tool("copy") {
command = "cp -af {{source}} {{output}}"
description = "COPY {{source}} {{output}}"
}
}
config("rust_defaults") {
rustflags = [ "-Cdebuginfo=2" ]
}