diff options
| author | Oneirical <manchot@videotron.ca> | 2024-05-12 14:00:09 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-05-12 14:00:09 -0400 |
| commit | f2de5fb2ae0f69d403a06ff4f963e63d95406591 (patch) | |
| tree | 000cb507f66283da961effa13a4579b2698ce9e9 /src/tools/run-make-support | |
| parent | 3349155ac082ed9034404428c8402e42a165d3d8 (diff) | |
| download | rust-f2de5fb2ae0f69d403a06ff4f963e63d95406591.tar.gz rust-f2de5fb2ae0f69d403a06ff4f963e63d95406591.zip | |
rewrite issue-14500 to rmake
Diffstat (limited to 'src/tools/run-make-support')
| -rw-r--r-- | src/tools/run-make-support/src/rustc.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/rustc.rs b/src/tools/run-make-support/src/rustc.rs index de773d688ef..c92e9f9b11f 100644 --- a/src/tools/run-make-support/src/rustc.rs +++ b/src/tools/run-make-support/src/rustc.rs @@ -150,6 +150,20 @@ impl Rustc { self } + /// Pass a codegen option. + pub fn codegen_option(&mut self, option: &str) -> &mut Self { + self.cmd.arg("-C"); + self.cmd.arg(option); + self + } + + /// Add a directory to the library search path. + pub fn library_search_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self { + self.cmd.arg("-L"); + self.cmd.arg(path.as_ref()); + self + } + /// Specify the edition year. pub fn edition(&mut self, edition: &str) -> &mut Self { self.cmd.arg("--edition"); |
