aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/config/go.amazon.properties34
-rw-r--r--lib/compilers/6g.js61
-rw-r--r--lib/compilers/golang.js4
-rw-r--r--static/compiler.js13
4 files changed, 19 insertions, 93 deletions
diff --git a/etc/config/go.amazon.properties b/etc/config/go.amazon.properties
index 32bc1eab3..f539d2463 100644
--- a/etc/config/go.amazon.properties
+++ b/etc/config/go.amazon.properties
@@ -1,9 +1,12 @@
defaultCompiler=gl192
textBanner=Compilation provided by Compiler Explorer at https://go.godbolt.org/
objdumper=/opt/compiler-explorer/gcc-7.2.0/bin/objdump
-# 1.7.2 & 1.8.5 disabled until we build them from source
-compilers=gccgo494:gccgo630:6g141:gccgo720:gl192
compileFilename=file.go
+compilers=gccgo494:gccgo630:gccgo720:&gl
+group.gl.compilers=6g141:gl172:gl185:gl192
+group.gl.versionFlag=version
+group.gl.compilerType=golang
+group.gl.supportsBinary=false
compiler.gccgo494.exe=/opt/compiler-explorer/gcc-4.9.4/bin/gccgo
compiler.gccgo494.alias=gccgo491
compiler.gccgo494.name=x86 gccgo 4.9.4
@@ -11,26 +14,19 @@ compiler.gccgo630.exe=/opt/compiler-explorer/gcc-6.3.0/bin/gccgo
compiler.gccgo630.name=x86 gccgo 6.3.0
compiler.gccgo720.exe=/opt/compiler-explorer/gcc-7.2.0/bin/gccgo
compiler.gccgo720.name=x86 gccgo 7.2.0
-compiler.6g141.exe=/opt/compiler-explorer/go/pkg/tool/linux_amd64/6g
+compiler.6g141.exe=/opt/compiler-explorer/go/bin/go
compiler.6g141.name=x86 gc 1.4.1
-compiler.6g141.versionFlag=-V
-compiler.6g141.compilerType=6g
-compiler.6g141.supportsBinary=false
-#compiler.gl172.exe=/opt/compiler-explorer/golang-1.7.2/go/bin/go
-#compiler.gl172.name=x86 gc 1.7.2
-#compiler.gl172.versionFlag=version
-#compiler.gl172.compilerType=golang
-#compiler.gl172.supportsBinary=false
-#compiler.gl185.exe=/opt/compiler-explorer/golang-1.8.5/go/bin/go
-#compiler.gl185.name=x86 gc 1.8.5
-#compiler.gl185.versionFlag=version
-#compiler.gl185.compilerType=golang
-#compiler.gl185.supportsBinary=false
+compiler.6g141.goroot=/opt/compiler-explorer/go
+compiler.gl172.exe=/opt/compiler-explorer/golang-1.7.2/go/bin/go
+compiler.gl172.name=x86 gc 1.7.2
+compiler.gl172.goroot=/opt/compiler-explorer/golang-1.7.2/go
+compiler.gl185.exe=/opt/compiler-explorer/golang-1.8.5/go/bin/go
+compiler.gl185.name=x86 gc 1.8.5
+compiler.gl185.goroot=/opt/compiler-explorer/golang-1.8.5/go
+#From version 1.9 you can omit goroot!
compiler.gl192.exe=/opt/compiler-explorer/golang-1.9.2/go/bin/go
compiler.gl192.name=x86 gc 1.9.2
-compiler.gl192.versionFlag=version
-compiler.gl192.compilerType=golang
-compiler.gl192.supportsBinary=false
+compiler.gl192.goroot=/opt/compiler-explorer/golang-1.9.2/go
#################################
diff --git a/lib/compilers/6g.js b/lib/compilers/6g.js
deleted file mode 100644
index 28959fc89..000000000
--- a/lib/compilers/6g.js
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012-2017, Matt Godbolt
-// 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.
-
-var Compile = require('../base-compiler');
-var _ = require('underscore-node');
-
-function compile6g(info, env) {
- function convert6g(code) {
- var re = /^[0-9]+\s*\(([^:]+):([0-9]+)\)\s*([A-Z]+)(.*)/;
- var prevLine = null;
- var file = null;
- return code.map(function (obj) {
- var line = obj.text;
- var match = line.match(re);
- if (match) {
- var res = "";
- if (file === null) {
- res += "\t.file 1 \"" + match[1] + "\"\n";
- file = match[1];
- }
- if (prevLine !== match[2]) {
- res += "\t.loc 1 " + match[2] + "\n";
- prevLine = match[2];
- }
- return res + "\t" + match[3].toLowerCase() + match[4];
- } else
- return null;
- }).filter(_.identity).join("\n");
- }
-
- var compiler = new Compile(info, env);
- compiler.postProcess = function (result, outputFilename, filters) {
- result.asm = convert6g(result.stdout);
- result.stdout = [];
- return Promise.resolve(result);
- };
- return compiler.initialise();
-}
-
-module.exports = compile6g; \ No newline at end of file
diff --git a/lib/compilers/golang.js b/lib/compilers/golang.js
index 9469e489c..ded9bf0a9 100644
--- a/lib/compilers/golang.js
+++ b/lib/compilers/golang.js
@@ -59,6 +59,10 @@ function compilenewgol(info, env) {
};
compiler.optionsForFilter = function (filters, outputFilename, userOptions) {
+ // If we're dealing with an older version...
+ if (this.compiler.id === '6g141') {
+ return ['tool', '6g', '-g', '-o', outputFilename, '-S'];
+ }
return ['tool', 'compile', '-o', outputFilename, '-S'];
};
diff --git a/static/compiler.js b/static/compiler.js
index 51273e18d..1ca81026b 100644
--- a/static/compiler.js
+++ b/static/compiler.js
@@ -475,7 +475,6 @@ define(function (require) {
this.eventHub.on('initialised', this.undefer, this);
this.saveState();
- this.checkCompiler();
}
Compiler.prototype.undefer = function () {
@@ -863,8 +862,6 @@ define(function (require) {
this.updateButtons();
this.updateCompilerName();
this.sendCompiler();
- // Let the user know if the user chooses a poorly supported Go version
- this.checkCompiler();
};
Compiler.prototype.sendCompiler = function () {
@@ -1126,16 +1123,6 @@ define(function (require) {
);
};
- // Checks the current compiler for special cases
- Compiler.prototype.checkCompiler = function() {
- // Go older 1.4.1 is poorly supported right now. Let people know
- if (this.compiler.id === '6g141') {
- new Alert().notify('gc 1.4.1 is poorly supported right now. Consider using a newer gc version!', {
- group: 'gc-update'
- });
- }
- };
-
return {
Compiler: Compiler
};