mirror of
https://github.com/denoland/deno.git
synced 2025-01-09 07:39:15 -05:00
Move libc build def to //build_extra/rust
This is preperation for adding many more third_party crates.
This commit is contained in:
parent
c4d61accf4
commit
e269d972d2
3 changed files with 16 additions and 11 deletions
14
BUILD.gn
14
BUILD.gn
|
@ -14,28 +14,20 @@ config("deno_config") {
|
||||||
|
|
||||||
rust_executable("deno") {
|
rust_executable("deno") {
|
||||||
source_root = "src/main.rs"
|
source_root = "src/main.rs"
|
||||||
extern = [ ":libc" ]
|
extern = [ "$rust_build:libc" ]
|
||||||
deps = [
|
deps = [
|
||||||
":libdeno",
|
":libdeno",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
rust_component("libc") {
|
|
||||||
source_root = "third_party/rust_crates/libc/src/lib.rs"
|
|
||||||
cfg = [
|
|
||||||
"feature=\"default\"",
|
|
||||||
"feature=\"use_std\"",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
rust_component("handlers") {
|
rust_component("handlers") {
|
||||||
source_root = "src/handlers.rs"
|
source_root = "src/handlers.rs"
|
||||||
extern = [ ":libc" ]
|
extern = [ "$rust_build:libc" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
rust_test("handlers_test") {
|
rust_test("handlers_test") {
|
||||||
source_root = "src/handlers.rs"
|
source_root = "src/handlers.rs"
|
||||||
extern = [ ":libc" ]
|
extern = [ "$rust_build:libc" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("deno_cc") {
|
executable("deno_cc") {
|
||||||
|
|
|
@ -13,3 +13,11 @@ rust_component("stdlib") {
|
||||||
libs = [ "userenv.lib" ]
|
libs = [ "userenv.lib" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rust_component("libc") {
|
||||||
|
source_root = "//third_party/rust_crates/libc/src/lib.rs"
|
||||||
|
cfg = [
|
||||||
|
"feature=\"default\"",
|
||||||
|
"feature=\"use_std\"",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
stdlib_label = "//build_extra/rust:stdlib"
|
stdlib_label = "//build_extra/rust:stdlib"
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
# Absolute path of rust build files.
|
||||||
|
rust_build = "//build_extra/rust/"
|
||||||
|
}
|
||||||
|
|
||||||
template("run_rustc") {
|
template("run_rustc") {
|
||||||
action(target_name) {
|
action(target_name) {
|
||||||
assert(defined(invoker.source_root), "Must specify source_root")
|
assert(defined(invoker.source_root), "Must specify source_root")
|
||||||
|
|
Loading…
Reference in a new issue