mirror of
https://github.com/denoland/deno.git
synced 2024-11-26 16:09:27 -05:00
d30664958e
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++.
15 lines
385 B
Text
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" ]
|
|
}
|
|
}
|