diff options
author | RabsRincon <ruben@rinconblanco.es> | 2020-06-15 12:47:31 +0200 |
---|---|---|
committer | RabsRincon <ruben@rinconblanco.es> | 2020-06-15 12:47:31 +0200 |
commit | b7fc8b1759b13ddbe84a38dcadff1539976f3f9e (patch) | |
tree | 9301dac694b8452de8e22b17370e6664da25810a /lib/compilers | |
parent | a86bf256b86c79ef5d506422c4b2083f5a187046 (diff) | |
download | compiler-explorer-b7fc8b1759b13ddbe84a38dcadff1539976f3f9e.tar.gz compiler-explorer-b7fc8b1759b13ddbe84a38dcadff1539976f3f9e.zip |
Ensure backend options are always generated
Diffstat (limited to 'lib/compilers')
-rw-r--r-- | lib/compilers/java.js | 8 | ||||
-rw-r--r-- | lib/compilers/ppci.js | 4 | ||||
-rw-r--r-- | lib/compilers/zig.js | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/lib/compilers/java.js b/lib/compilers/java.js index eefab8b30..18e89947f 100644 --- a/lib/compilers/java.js +++ b/lib/compilers/java.js @@ -99,7 +99,7 @@ class JavaCompiler extends BaseCompiler { const filteredOptions = []; let toSkip = 0; - const oneArgBlacklist = [ + const oneArgForbiddenList = [ // -d directory // Sets the destination directory for class files. "-d", @@ -108,13 +108,15 @@ class JavaCompiler extends BaseCompiler { "-s", // --source-path path or -sourcepath path // Specifies where to find input source files. - "--source-path", "-sourcepath"]; + "--source-path", "-sourcepath" + ]; + for (const userOption of userOptions) { if (toSkip > 0) { toSkip--; continue; } - if (oneArgBlacklist.indexOf(userOption) !== -1) { + if (oneArgForbiddenList.indexOf(userOption) !== -1) { toSkip = 1; continue; } diff --git a/lib/compilers/ppci.js b/lib/compilers/ppci.js index cb91d4220..0ad446071 100644 --- a/lib/compilers/ppci.js +++ b/lib/compilers/ppci.js @@ -26,7 +26,7 @@ const BaseCompiler = require('../base-compiler'), exec = require('../exec'), logger = require('../logger').logger; -const blacklist = [ +const forbiddenOptions = [ '--report', '--text-report', '--html-report' @@ -37,7 +37,7 @@ class PPCICompiler extends BaseCompiler { return args.filter((item) => { if (typeof item !== "string") return true; - return !blacklist.includes(item.toLowerCase()); + return !forbiddenOptions.includes(item.toLowerCase()); }); } diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index 1ebbfa441..f498ba046 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -92,8 +92,8 @@ class ZigCompiler extends BaseCompiler { } filterUserOptions(userOptions) { - const blacklist = /^(((--(cache-dir|name|output|verbose))|(-mllvm)).*)$/; - return _.filter(userOptions, option => !blacklist.test(option)); + const forbiddenOptions = /^(((--(cache-dir|name|output|verbose))|(-mllvm)).*)$/; + return _.filter(userOptions, option => !forbiddenOptions.test(option)); } isCfgCompiler(/*compilerVersion*/) { |