aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/rust.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/rust.js')
-rw-r--r--lib/compilers/rust.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/compilers/rust.js b/lib/compilers/rust.js
index 622d914b0..84d0b156c 100644
--- a/lib/compilers/rust.js
+++ b/lib/compilers/rust.js
@@ -39,16 +39,17 @@ export class RustCompiler extends BaseCompiler {
this.compiler.supportsIntel = true;
this.compiler.supportsIrView = true;
this.compiler.supportsRustMirView = true;
- // Macro expansion through -Zunpretty=expanded is only available for Nightly
- this.compiler.supportsRustMacroExpView = info.name === 'nightly' || info.semver === 'nightly';
+
+ const isNightly = info.name === 'nightly' || info.semver === 'nightly';
+ // Macro expansion (-Zunpretty=expanded) and HIR (-Zunpretty=hir-tree)
+ // are only available for Nightly
+ this.compiler.supportsRustMacroExpView = isNightly;
+ this.compiler.supportsRustHirView = isNightly;
+
this.compiler.irArg = ['--emit', 'llvm-ir'];
this.linker = this.compilerProps('linker');
}
- getRustMirOutputFilename(outputFilename) {
- return outputFilename.replace(path.extname(outputFilename), '.mir');
- }
-
getSharedLibraryPathsAsArguments() {
return [];
}