-
Notifications
You must be signed in to change notification settings - Fork 547
issue-130 copy contents related x.py from rust-forge to rustc-guide #195
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Build distribution artifacts | ||
|
||
You might want to build and package up the compiler for distribution. | ||
You’ll want to run this command to do it: | ||
|
||
```bash | ||
./x.py dist | ||
``` | ||
|
||
# Install distribution artifacts | ||
|
||
If you’ve built a distribution artifact you might want to install it and | ||
test that it works on your target system. You’ll want to run this command: | ||
|
||
```bash | ||
./x.py install | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps add a note that usually you want to create a toolchain instead and link to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mark-i-m I didn't get this comment. could you please explain the note that needs to be added here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are testing out a modification to a compiler, you might want to use it to compile some project. Usually, you do not want to use If you want you can just copy paste what I wrote. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is done. |
||
Note: If you are testing out a modification to a compiler, you might want to use it to compile some project. | ||
Usually, you do not want to use ./x.py install for testing. | ||
Rather, you should create a toolchain as discussed in how-to-build-and-run.html#creating-a-rustup-toolchain. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you make this a link to the actual chapter please? |
||
For example, if the toolchain you created is called foo, you would then invoke it with rustc +foo ... (where ... represents the rest of the arguments). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you put the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Documenting rustc | ||
mark-i-m marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
You might want to build documentation of the various components | ||
available like the standard library. There’s two ways to go about this. | ||
You can run rustdoc directly on the file to make sure the HTML is | ||
correct, which is fast. Alternatively, you can build the documentation | ||
as part of the build process through x.py. Both are viable methods | ||
since documentation is more about the content. | ||
|
||
## Document everything | ||
|
||
```bash | ||
./x.py doc | ||
``` | ||
|
||
## If you want to avoid the whole Stage 2 build | ||
|
||
```bash | ||
./x.py doc --stage 1 | ||
``` | ||
|
||
First the compiler and rustdoc get built to make sure everything is okay | ||
and then it documents the files. | ||
|
||
## Document specific components | ||
|
||
```bash | ||
./x.py doc src/doc/book | ||
./x.py doc src/doc/nomicon | ||
./x.py doc src/doc/book src/libstd | ||
``` | ||
|
||
Much like individual tests or building certain components you can build only | ||
the documentation you want. | ||
|
||
## Document internal rustc items | ||
|
||
Compiler documentation is not built by default - there's a flag in config.toml for achieving the same. | ||
But, when enabled, compiler documentation does include internal items. | ||
|
||
Next open up config.toml and make sure these two lines are set to true: | ||
|
||
```bash | ||
docs = true | ||
mark-i-m marked this conversation as resolved.
Show resolved
Hide resolved
|
||
compiler-docs = true | ||
``` | ||
|
||
When you want to build the compiler docs as well run this command: | ||
|
||
```bash | ||
./x.py doc | ||
``` | ||
|
||
This will see that the docs and compiler-docs options are set to true | ||
and build the normally hidden compiler docs! |
Uh oh!
There was an error while loading. Please reload this page.