aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ocaml.js
diff options
context:
space:
mode:
authorPatrick Quist <partouf@gmail.com>2021-08-26 21:57:07 +0200
committerGitHub <noreply@github.com>2021-08-26 21:57:07 +0200
commit5e5e60159a527b9c3c2f652781c0071127ef45bc (patch)
tree364bba4bc1b5d0952688c6c0ba11a5d081c0755d /lib/compilers/ocaml.js
parent6e33f7a61e4785c054dc0bc8dc3f17f5dbafdadb (diff)
downloadcompiler-explorer-5e5e60159a527b9c3c2f652781c0071127ef45bc.tar.gz
compiler-explorer-5e5e60159a527b9c3c2f652781c0071127ef45bc.zip
Multifile/IDE mode (#2725)
Diffstat (limited to 'lib/compilers/ocaml.js')
-rw-r--r--lib/compilers/ocaml.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/compilers/ocaml.js b/lib/compilers/ocaml.js
index de1c91c96..46b396773 100644
--- a/lib/compilers/ocaml.js
+++ b/lib/compilers/ocaml.js
@@ -43,11 +43,14 @@ export class OCamlCompiler extends BaseCompiler {
return options;
}
- getOutputFilename(dirPath) {
- return path.join(dirPath, `${path.basename(this.compileFilename, this.lang.extensions[0])}.s`);
+ getOutputFilename(dirPath, outputFilebase, key) {
+ const filename = key.backendOptions.customOutputFilename ||
+ `${path.basename(this.compileFilename, this.lang.extensions[0])}.s`;
+ return path.join(dirPath, filename);
}
- getExecutableFilename(dirPath, outputFilebase) {
- return path.join(dirPath, outputFilebase);
+ getExecutableFilename(dirPath, outputFilebase, key) {
+ const filename = key.backendOptions.customOutputFilename || outputFilebase;
+ return path.join(dirPath, filename);
}
}