aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ocaml.js
diff options
context:
space:
mode:
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);
}
}