aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
diff options
context:
space:
mode:
authorJeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>2023-06-26 19:28:09 -0500
committerGitHub <noreply@github.com>2023-06-26 20:28:09 -0400
commita9bd0a1f808d73c1b4ab5e06a8233478a2b285f5 (patch)
tree01a50c697713dd536b4081054dc3d5b710f85b30 /lib/compilers
parent660319505a04b8f071e6f86687b167734abbe96c (diff)
downloadcompiler-explorer-a9bd0a1f808d73c1b4ab5e06a8233478a2b285f5.tar.gz
compiler-explorer-a9bd0a1f808d73c1b4ab5e06a8233478a2b285f5.zip
Add the movfuscator (#5193)gh-7994
Resolves #985 Builder: https://github.com/compiler-explorer/misc-builder/pull/65 Infra: https://github.com/compiler-explorer/infra/pull/1041
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,
+ },
+ });
+ }
+}