1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 17:49:08 -05:00
denoland-deno/build_extra/rust/BUILD.gn
Ryan Dahl d30664958e Further gn/rust cleanups
Move rust.gni and deno.gni into build_extra/

Removes rust_library which was only an action. This instead defines
rust_component, which is an action plus a gn "component" target
to expose the resulting object file. This simplifies link code in
rust.gni.

Support rust modules that can be linked into C++.
2018-07-06 10:46:30 -04:00

15 lines
385 B
Text

import("rust.gni")
# By compiling an empty file as crate-type=staticlib we get all the code
# for the rust stdlib, which are not included in the object file outputs
# of other libs.
rust_component("stdlib") {
crate_type = "staticlib"
source_root = "empty.rs"
if (current_os == "mac") {
libs = [ "resolv" ]
}
if (current_os == "win") {
libs = [ "userenv.lib" ]
}
}