File tree 4 files changed +22
-6
lines changed
compiler/rustc_driver_impl
4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,23 @@ See [the rustc-dev-guide for more info][sysllvm].
79
79
./configure
80
80
```
81
81
82
- If you plan to use ` x.py install ` to create an installation, it is
83
- recommended that you set the ` prefix ` value in the ` [install] ` section to a
84
- directory: ` ./configure --set install.prefix=<path> `
82
+ If you plan to use ` x.py install ` to create an installation, you can either
83
+ set ` DESTDIR ` environment variable to your custom directory path:
84
+
85
+ ``` bash
86
+ export DESTDIR=< path>
87
+ ```
88
+
89
+ or set ` prefix ` and ` sysconfdir ` in the ` [install] ` section to your custom
90
+ directory path:
91
+
92
+ ``` sh
93
+ ./configure --set install.prefix=< path> --set install.sysconfdir=< path>
94
+ ```
95
+
96
+ When the ` DESTDIR ` environment variable is present, the ` prefix ` and
97
+ ` sysconfdir ` values are combined with the path from the ` DESTDIR `
98
+ environment variable.
85
99
86
100
3 . Build and install:
87
101
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ options).
7
7
8
8
For more information about how the driver works, see the [ rustc dev guide] .
9
9
10
- [ rustc dev guide ] : https://rustc-dev-guide.rust-lang.org/rustc-driver.html
10
+ [ rustc dev guide ] : https://rustc-dev-guide.rust-lang.org/rustc-driver/intro .html
Original file line number Diff line number Diff line change 213
213
//! - All other locals need to be declared with `let` somewhere and then can be accessed by name.
214
214
//!
215
215
//! #### Places
216
- //! - Locals implicit convert to places.
216
+ //! - Locals implicitly convert to places.
217
217
//! - Field accesses, derefs, and indexing work normally.
218
218
//! - Fields in variants can be accessed via the [`Variant`] and [`Field`] associated functions,
219
219
//! see their documentation for details.
Original file line number Diff line number Diff line change @@ -117,13 +117,15 @@ impl Thread {
117
117
pub fn set_name ( name : & CStr ) {
118
118
const PR_SET_NAME : libc:: c_int = 15 ;
119
119
unsafe {
120
- libc:: prctl (
120
+ let res = libc:: prctl (
121
121
PR_SET_NAME ,
122
122
name. as_ptr ( ) ,
123
123
0 as libc:: c_ulong ,
124
124
0 as libc:: c_ulong ,
125
125
0 as libc:: c_ulong ,
126
126
) ;
127
+ // We have no good way of propagating errors here, but in debug-builds let's check that this actually worked.
128
+ debug_assert_eq ! ( res, 0 ) ;
127
129
}
128
130
}
129
131
You can’t perform that action at this time.
0 commit comments