aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers')
-rw-r--r--lib/compilers/_all.ts1
-rw-r--r--lib/compilers/movfuscator.ts47
2 files changed, 48 insertions, 0 deletions
diff --git a/lib/compilers/_all.ts b/lib/compilers/_all.ts
index 2d6578d52..a66343ecd 100644
--- a/lib/compilers/_all.ts
+++ b/lib/compilers/_all.ts
@@ -74,6 +74,7 @@ export {LDCCompiler} from './ldc.js';
export {LLCCompiler} from './llc.js';
export {LLVMmcaTool} from './llvm-mca.js';
export {LLVMMOSCompiler} from './llvm-mos.js';
+export {MovfuscatorCompiler} from './movfuscator.js';
export {MLIRCompiler} from './mlir.js';
export {GM2Compiler} from './gm2.js';
export {MrustcCompiler} from './mrustc.js';
diff --git a/lib/compilers/movfuscator.ts b/lib/compilers/movfuscator.ts
new file mode 100644
index 000000000..3a0ddf69a
--- /dev/null
+++ b/lib/compilers/movfuscator.ts
@@ -0,0 +1,47 @@
+// Copyright (c) 2023, Compiler Explorer Authors
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+
+import {ExecutionOptions} from '../../types/compilation/compilation.interfaces.js';
+import {BaseCompiler} from '../base-compiler.js';
+import * as exec from '../exec.js';
+
+export class MovfuscatorCompiler extends BaseCompiler {
+ static get key() {
+ return 'movfuscator';
+ }
+
+ override isCfgCompiler(compilerVersion: string) {
+ return true;
+ }
+
+ override async exec(filepath: string, args: string[], execOptions: ExecutionOptions) {
+ return await exec.execute(filepath, args, {
+ ...execOptions,
+ env: {
+ MOVBUILDDIR: '/opt/compiler-explorer/movfuscator-trunk/build',
+ ...execOptions.env,
+ },
+ });
+ }
+}