-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vinh Tran
committed
Nov 9, 2023
1 parent
960c70a
commit b15175b
Showing
2 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,34 @@ | ||
|
||
This directory demonstrates an example of how to rebuild the standard library | ||
for an arbitrary platform and custom configurations. | ||
|
||
TODO: Write up on how the toolchain bootrapping process works. | ||
|
||
To build an end-user rust_library target for specific target, run | ||
|
||
``` | ||
bazel build //hello_lib --platforms=//:aarch64-apple-darwin | ||
``` | ||
|
||
for `aarch64-apple-darwin` or | ||
|
||
``` | ||
bazel build //hello_lib --platforms=//:wasm32-wasi | ||
``` | ||
|
||
for `wasm32-wasi`. | ||
|
||
The toolchains orderly registered in WORKSPACE and _beta_channel_transition ensure | ||
that the standard library is rebuilt for the given platform. | ||
|
||
To only rebuild std, run | ||
|
||
``` | ||
bazel build @stdlbs//:std --platforms=//:aarch64-apple-darwin | ||
``` | ||
|
||
or | ||
|
||
``` | ||
bazel build //hello_lib --config=apple | ||
bazel build //hello_lib --config=wasi | ||
bazel build @stdlbs//:std --platforms=//:wasm32-wasi | ||
``` |