Skip to content

Use -Zbuild-std #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ install:
- rustup component add clippy
- rustup component add rustfmt
- rustup component add rust-src
- cargo install cargo-xbuild
- sudo apt-get install -y mtools
- wget https://download.clearlinux.org/releases/28660/clear/clear-28660-kvm.img.xz
- unxz clear-28660-kvm.img.xz
- ./make-test-disks.sh

script:
- cargo xbuild --release --target target.json
- cargo xclippy --target target.json
- cargo build --target target.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem
- cargo build --release --target target.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem
- cargo clippy --target target.json -Zbuild-std=core
- cargo clippy --all-targets --all-features
- cargo fmt --all -- --check
- cargo test
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2018"
# needed here to make "cargo check" and "cargo clippy" run without errors.
[profile.dev]
panic = "abort"
lto = true

[profile.release]
panic = "abort"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ all the way into the OS.

To compile:

cargo xbuild --release --target target.json
cargo build --release --target target.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem

The result will be in:

Expand Down
5 changes: 1 addition & 4 deletions run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ set -xeuf

source "${CARGO_HOME:-$HOME/.cargo}/env"

XBUILD_VERSION="0.6.2"
cargo install cargo-xbuild --version $XBUILD_VERSION

rustup component add rust-src
cargo xbuild --release --target target.json
cargo build --release --target target.json -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem

CH_VERSION="v0.8.0"
CH_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/$CH_VERSION/cloud-hypervisor"
Expand Down
1 change: 1 addition & 0 deletions src/asm/ram32.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.section .text32, "ax"
.global ram32_start
.code32

ram32_start:
Expand Down
2 changes: 1 addition & 1 deletion target.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"llvm-target": "x86_64-unknown-none",
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"arch": "x86_64",
"target-endian": "little",
"target-pointer-width": "64",
Expand Down