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.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/compilers/ocaml.js b/lib/compilers/ocaml.js
index 8bd3d9c09..de1c91c96 100644
--- a/lib/compilers/ocaml.js
+++ b/lib/compilers/ocaml.js
@@ -33,11 +33,21 @@ export class OCamlCompiler extends BaseCompiler {
return [];
}
- optionsForFilter() {
- return ['-S', '-g', '-c'];
+ optionsForFilter(filters, outputFileName) {
+ let options = ['-g', '-S'];
+ if (filters.binary) {
+ options = options.concat('-o', this.filename(outputFileName));
+ } else {
+ options = options.concat('-c');
+ }
+ return options;
}
getOutputFilename(dirPath) {
return path.join(dirPath, `${path.basename(this.compileFilename, this.lang.extensions[0])}.s`);
}
+
+ getExecutableFilename(dirPath, outputFilebase) {
+ return path.join(dirPath, outputFilebase);
+ }
}