Skip to content
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

introduce a target to build the kernel of the unikernel HermitCore #66713

Merged
merged 3 commits into from
Nov 27, 2019

Conversation

stlankes
Copy link
Contributor

We are developing the unikernel HermitCore, where the kernel is written in Rust and is already supported by the Rust Standard Library. To compile the kernel with the new build flag "-Z build-std", we introduce a new target, which avoids the usage of SSE & AVX within the kernel.

- the target avoids the usage of SSE & AVX within the kernel
@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-24T20:15:54.8987372Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-24T20:15:54.9159600Z ##[command]git config gc.auto 0
2019-11-24T20:15:54.9226721Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-24T20:15:54.9276474Z ##[command]git config --get-all http.proxy
2019-11-24T20:15:54.9397131Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66713/merge:refs/remotes/pull/66713/merge
---
2019-11-24T20:21:36.0731654Z   = note: `#[warn(unused_imports)]` on by default
2019-11-24T20:21:36.0736532Z 
2019-11-24T20:21:45.9640375Z     Finished release [optimized] target(s) in 1m 19s
2019-11-24T20:21:45.9739195Z tidy check
2019-11-24T20:21:46.4733843Z tidy error: /checkout/src/librustc_target/spec/x86_64_unknown_hermit_kernel.rs:7: line longer than 100 chars
2019-11-24T20:21:48.3814502Z some tidy checks failed
2019-11-24T20:21:48.3814594Z Found 485 error codes
2019-11-24T20:21:48.3814669Z Found 0 error codes with no tests
2019-11-24T20:21:48.3814714Z Done!
2019-11-24T20:21:48.3814714Z Done!
2019-11-24T20:21:48.3814744Z 
2019-11-24T20:21:48.3814772Z 
2019-11-24T20:21:48.3815914Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2019-11-24T20:21:48.3816023Z 
2019-11-24T20:21:48.3816043Z 
2019-11-24T20:21:48.3819005Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-11-24T20:21:48.3819059Z Build completed unsuccessfully in 0:01:23
2019-11-24T20:21:48.3819059Z Build completed unsuccessfully in 0:01:23
2019-11-24T20:21:48.3869568Z == clock drift check ==
2019-11-24T20:21:48.3897552Z   local time: Sun Nov 24 20:21:48 UTC 2019
2019-11-24T20:21:48.4153390Z   network time: Sun, 24 Nov 2019 20:21:48 GMT
2019-11-24T20:21:48.4153511Z == end clock drift check ==
2019-11-24T20:21:49.7382959Z 
2019-11-24T20:21:49.7471907Z ##[error]Bash exited with code '1'.
2019-11-24T20:21:49.7498217Z ##[section]Starting: Checkout
2019-11-24T20:21:49.7499878Z ==============================================================================
2019-11-24T20:21:49.7499954Z Task         : Get sources
2019-11-24T20:21:49.7499992Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bjorn3
Copy link
Member

bjorn3 commented Nov 24, 2019

Could you use a target specification json file instead? Or does -Zbuild-std not support that yet?

@stlankes
Copy link
Contributor Author

As far as I know, build-std does not support a json file (https://doc.rust-lang.org/nightly/cargo/reference/unstable.html). I want to build the kernel as follow:

cargo build -Z build-std=core,alloc --target x86_64-unknown-hermit-kernel

@stlankes stlankes changed the title introduce a target to build the kernel HermitCore introduce a target to build the kernel of the unikernel HermitCore Nov 24, 2019
@bjorn3
Copy link
Member

bjorn3 commented Nov 24, 2019

The docs don't explicitely say that it is not yet allowed.

@stlankes
Copy link
Contributor Author

stlankes commented Nov 24, 2019

I just test a json file and it seems to work. Thanks you for the hint!

Like x86_64_linux_kernel, the PR would help our work. However we are able to use a json file.

@davidtwco
Copy link
Member

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 25, 2019

📌 Commit 55ce5c0 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2019
tmandry added a commit to tmandry/rust that referenced this pull request Nov 26, 2019
introduce a target to build the kernel of the unikernel HermitCore

We are developing the unikernel HermitCore, where the kernel is written in Rust and is already supported by the Rust Standard Library. To compile the kernel with the new build flag "-Z build-std", we introduce a new target, which avoids the usage of SSE & AVX within the kernel.
bors added a commit that referenced this pull request Nov 27, 2019
Rollup of 14 pull requests

Successful merges:

 - #66128 (alloc: Add new_zeroed() versions like new_uninit().)
 - #66661 (Add riscv64gc-unknown-linux-gnu target)
 - #66663 (Miri: print leak report even without tracing)
 - #66711 (Add hardware floating point features to aarch64-pc-windows-msvc)
 - #66713 (introduce a target to build the kernel of the unikernel HermitCore)
 - #66717 (tidy: Accommodate rustfmt's preferred layout of stability attributes)
 - #66719 (Store pointer width as u32 on Config)
 - #66720 (Move ErrorReported to rustc_errors)
 - #66737 (Error codes cleanup)
 - #66754 (Various tweaks to diagnostic output)
 - #66763 (Minor edit for documentation-tests.md that increases clarity)
 - #66779 (follow the same function order in the trait)
 - #66786 (Add wildcard test for const_if_match)
 - #66788 (Allow `Unreachable` terminators through `min_const_fn` checks)

Failed merges:

r? @ghost
@bors bors merged commit 55ce5c0 into rust-lang:master Nov 27, 2019
ehuss added a commit to ehuss/rust-forge that referenced this pull request May 15, 2020
- aarch64-unknown-none: rust-lang/rust#68334
- aarch64-unknown-none-softfloat: rust-lang/rust#64589
- armv7-unknown-linux-gnueabi: rust-lang/rust#63107
- armv7-unknown-linux-musleabi: rust-lang/rust#63107
- aarch64-apple-tvos: rust-lang/rust#68191
- armv7a-none-eabihf: rust-lang/rust#68253
- i686-unknown-uefi: rust-lang/rust#64334
- thumbv7neon-unknown-linux-musleabihf: rust-lang/rust#66103
- x86_64-apple-ios-macabi: rust-lang/rust#63467
- x86_64-apple-tvos: rust-lang/rust#68191
- x86_64-linux-kernel: rust-lang/rust#64051
- x86_64-unknown-hermit-kernel: rust-lang/rust#66713
- x86_64-unknown-illumos: rust-lang/rust#71145

Moved to tier 2:
- aarch64-unknown-none: rust-lang/rust#68334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants