File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,21 @@ pub fn cargo_manifest_links() -> Option<String> {
112
112
get_opt_str ( "CARGO_MANIFEST_LINKS" )
113
113
}
114
114
115
+ /// Contains parameters needed for Cargo’s [jobserver] implementation to parallelize
116
+ /// subprocesses.
117
+ ///
118
+ /// Rustc or cargo invocations from build.rs can already read
119
+ /// `CARGO_MAKEFLAGS`, but GNU Make requires the flags to be specified either
120
+ /// directly as arguments, or through the `MAKEFLAGS` environment variable.
121
+ /// Currently Cargo doesn’t set the `MAKEFLAGS` variable, but it’s free for build
122
+ /// scripts invoking GNU Make to set it to the contents of `CARGO_MAKEFLAGS`.
123
+ ///
124
+ /// [jobserver]: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html
125
+ #[ track_caller]
126
+ pub fn cargo_makeflags ( ) -> Option < String > {
127
+ get_opt_str ( "CARGO_MAKEFLAGS" )
128
+ }
129
+
115
130
/// For each activated feature of the package being built, this will be `true`.
116
131
#[ track_caller]
117
132
pub fn cargo_feature ( name : & str ) -> bool {
You can’t perform that action at this time.
0 commit comments