Skip to content

Commit

Permalink
Reuse Xargo
Browse files Browse the repository at this point in the history
This is the preparing steps for starting our own libstd.
  • Loading branch information
Thomas Guillemard committed Aug 22, 2019
1 parent 7a4c43c commit b2a5da5
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 53 deletions.
106 changes: 53 additions & 53 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,105 +40,105 @@ install_crate = { rustup_component_name = "rust-src" }
[tasks.install-mkisofs-rs]
install_crate = { crate_name = "mkisofs-rs", binary = "mkisofs-rs", test_arg = "--help", min_version = "0.1.1" }

[tasks.install-cargo-xbuild]
[tasks.install-xargo]
dependencies = ["install-rust-src"]
install_crate = { crate_name = "cargo-xbuild", binary = "cargo", test_arg = ["xbuild", "--help"], min_version = "0.5.14" }
install_crate = { crate_name = "xargo", binary = "xargo", test_arg = "--help" }

[tasks.bootstrap]
description = "Compiles the i386 bootstrap for debug"
dependencies = ["bootstrap-linker", "install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none", "--package=sunrise-bootstrap" ]
dependencies = ["bootstrap-linker", "install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none", "--package=sunrise-bootstrap" ]

[tasks.bootstrap-release]
description = "Compiles the i386 bootstrap for release"
dependencies = ["bootstrap-linker", "install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none", "--package=sunrise-bootstrap", "--release" ]
dependencies = ["bootstrap-linker", "install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none", "--package=sunrise-bootstrap", "--release" ]

[tasks.kernel]
description = "Compiles the kernel for debug"
dependencies = ["kernel-linker", "install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none", "--package=sunrise-kernel", "-Z", "package-features", "--features=panic-on-exception"]
dependencies = ["kernel-linker", "install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none", "--package=sunrise-kernel", "-Z", "package-features", "--features=panic-on-exception"]

[tasks.kernel-release]
description = "Compiles the kernel for release"
dependencies = ["kernel-linker", "install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none", "--package=sunrise-kernel", "--release" ]
dependencies = ["kernel-linker", "install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none", "--package=sunrise-kernel", "--release" ]

[tasks.vi]
description = "Compiles sunrise-vi"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-vi"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-vi"]

[tasks.vi-release]
description = "Compiles sunrise-vi"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-vi", "--release"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-vi", "--release"]

[tasks.sm]
description = "Compiles sunrise-sm"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-sm"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-sm"]

[tasks.sm-release]
description = "Compiles sunrise-sm"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-sm", "--release"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-sm", "--release"]

[tasks.shell]
description = "Compiles sunrise-shell"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-shell"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-shell"]

[tasks.shell-release]
description = "Compiles sunrise-shell"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-shell", "--release"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-shell", "--release"]

[tasks.wall-clock]
description = "Compiles sunrise-wall-clock"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-wall-clock"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-wall-clock"]

[tasks.wall-clock-release]
description = "Compiles sunrise-wall-clock"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-wall-clock", "--release"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-wall-clock", "--release"]

[tasks.ahci]
description = "Compiles sunrise-ahci"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-ahci"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-ahci"]

[tasks.ahci-release]
description = "Compiles sunrise-ahci"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-ahci", "--release"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-ahci", "--release"]

[tasks.time]
description = "Compiles sunrise-time"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xrustc", "--target=i386-unknown-none-user", "--package=sunrise-time", "--", "-Zexternal-macro-backtrace"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-time"]

[tasks.time-release]
description = "Compiles sunrise-time"
dependencies = ["install-cargo-xbuild"]
command = "cargo"
args = ["xbuild", "--target=i386-unknown-none-user", "--package=sunrise-time", "--release"]
dependencies = ["install-xargo"]
command = "xargo"
args = ["build", "--target=i386-unknown-none-user", "--package=sunrise-time", "--release"]

[tasks.userspace]
description = "Compiles userspace apps"
Expand Down Expand Up @@ -282,10 +282,10 @@ args = ["-c", "kernel/src/main.rs", "bootstrap/src/main.rs",

[tasks.clippy-sunrise-target]
description = "Run clippy on sunrise components"
dependencies = ["install-cargo-xbuild", "refresh-crates"]
dependencies = ["install-xargo", "refresh-crates"]
install_crate = { rustup_component_name = "clippy" }
command = "cargo"
args = ["xclippy", "--target=i386-unknown-none",
command = "xargo"
args = ["clippy", "--target=i386-unknown-none",
"--all", "--exclude", "swipc-gen", "--exclude", "swipc-parser",
"--exclude", "docs",
"--",
Expand Down
10 changes: 10 additions & 0 deletions Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[dependencies.core]
stage = 0

[dependencies.compiler_builtins]
version = "*"
stage = 0
features = ["core", "mem"]

[dependencies.alloc]
stage = 0

0 comments on commit b2a5da5

Please sign in to comment.