aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/mrustc.js
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2021-05-27 22:47:22 +0200
committerGitHub <noreply@github.com>2021-05-27 22:47:22 +0200
commit64450523f2c63f6a6df8f80028954d176aa1f9c9 (patch)
tree00d6ab909a7b4d16dd3686849307e5f43c79c946 /lib/compilers/mrustc.js
parent361e0c2be78a8adc8fb5ea00d146e8755c1caba6 (diff)
downloadcompiler-explorer-64450523f2c63f6a6df8f80028954d176aa1f9c9.tar.gz
compiler-explorer-64450523f2c63f6a6df8f80028954d176aa1f9c9.zip
mrustc: force crate_type to rlib (#2691)
Defaults to bin, which will complain when there is no main(). But at the moment compiler explorer has no way to compile the resulting C and get an executable.
Diffstat (limited to 'lib/compilers/mrustc.js')
-rw-r--r--lib/compilers/mrustc.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/compilers/mrustc.js b/lib/compilers/mrustc.js
index ab8ff52cb..90739e5f9 100644
--- a/lib/compilers/mrustc.js
+++ b/lib/compilers/mrustc.js
@@ -38,7 +38,10 @@ export class MrustcCompiler extends BaseCompiler {
// Craft the 'outname' to have the intermediate .c file writen in outputFilename.
let outname = path.join(path.dirname(this.filename(outputFilename)),
path.basename(this.filename(outputFilename), '.c'));
- return ['-o', outname, '-L', path.join(path.dirname(this.compiler.exe), '..', 'output')];
+
+ // Currently always targets a rlib, no binary support at the moment.
+ return ['--crate-type', 'rlib',
+ '-o', outname, '-L', path.join(path.dirname(this.compiler.exe), '..', 'output')];
}
async runCompiler(compiler, options, inputFilename, execOptions) {