diff options
| author | jyn <github@jyn.dev> | 2023-06-24 13:39:46 -0500 |
|---|---|---|
| committer | jyn <github@jyn.dev> | 2023-06-29 10:05:10 -0500 |
| commit | 444fa4ee6cdf3d7d3774810c6f10c25bcd74aba9 (patch) | |
| tree | 99376d7b94fe5f19b912f02249675bbe6d600040 /src/doc/rustc-dev-guide | |
| parent | 990bce9d517162e9b213aae11e881dc43855141e (diff) | |
| download | rust-444fa4ee6cdf3d7d3774810c6f10c25bcd74aba9.tar.gz rust-444fa4ee6cdf3d7d3774810c6f10c25bcd74aba9.zip | |
Improve Windows docs
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md b/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md index 7aee7a6df26..055cdca86f8 100644 --- a/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md +++ b/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md @@ -72,7 +72,8 @@ Some alternative ways are: # On a Unix shell if you don't have the necessary `python3` command ./x <subcommand> [flags] -# On Windows (if powershell is configured to run scripts) +# In Windows Powershell (if powershell is configured to run scripts) +./x <subcommand> [flags] ./x.ps1 <subcommand> [flags] # On the Windows Command Prompt (if .py files are configured to run Python) @@ -82,7 +83,24 @@ x.py <subcommand> [flags] python x.py <subcommand> [flags] ``` -### Running `x.py` slightly more conveniently +On Windows, the Powershell commands may give you an error that looks like this: +``` +PS C:\Users\vboxuser\rust> ./x +./x : File C:\Users\vboxuser\rust\x.ps1 cannot be loaded because running scripts is disabled on this system. For more +information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. +At line:1 char:1 ++ ./x ++ ~~~ + + CategoryInfo : SecurityError: (:) [], PSSecurityException + + FullyQualifiedErrorId : UnauthorizedAccess +``` + +You can avoid this error by allowing powershell to run local scripts: +``` +Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +``` + +#### Running `x.py` slightly more conveniently There is a binary that wraps `x.py` called `x` in `src/tools/x`. All it does is run `x.py`, but it can be installed system-wide and run from any subdirectory |
