Banner fixes

This commit is contained in:
Matt Godbolt 2017-01-15 16:29:01 -06:00
parent 801c58604a
commit 6ecd63bef0
6 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,7 @@
compilers=gcc1204@20480:&gcc86:&icc:&clang:&cl:&cross:&ellcc
defaultCompiler=g63
textBanner=Compilation provided by Compiler Explorer at https://gcc.godbolt.org/
###############################
# GCC for x86
group.gcc86.compilers=g471:g472:g473:g474:g481:g482:g483:g484:g485:g490:g491:g492:g493:g494:g510:g520:g530:g540:g6:g62:g63:g7snapshot

View File

@ -1,5 +1,6 @@
# Matt's home development computer
defaultCompiler=g54
textBanner=Testing the text banner
compilers=g54:g47:g48:avr
#compilers=localhost@20480
compiler.g54.exe=/usr/bin/g++

View File

@ -1,4 +1,5 @@
compilers=gdc48:gdc49:gdc52:&ldc
textBanner=Compilation provided by Compiler Explorer at https://d.godbolt.org/
defaultCompiler=gdc52
# This is only due to limitations on the d.godbolt.org image for now.
supportsBinary=false

View File

@ -1,4 +1,5 @@
defaultCompiler=gccgo491
textBanner=Compilation provided by Compiler Explorer at https://go.godbolt.org/
compilers=gccgo491:6g141
compileFilename=file.go
compiler.gccgo491.exe=/usr/bin/gccgo

View File

@ -1,4 +1,5 @@
compilers=&rust
textBanner=Compilation provided by Compiler Explorer at https://rust.godbolt.org/
defaultCompiler=r1140
group.rust.compilers=r1140:r1130:r1120:r1110:r1100:r190:r180:r170:r160:r150:r140:r130:r120:r110:r100:nightly:beta
group.rust.compilerType=rust

View File

@ -85,6 +85,7 @@ function CompileHandler(gccProps, compilerProps) {
});
};
var proxy = httpProxy.createProxyServer({});
var textBanner = compilerProps('textBanner');
this.handler = _.bind(function compile(req, res, next) {
var source, options, filters, compiler;
@ -149,7 +150,7 @@ function CompileHandler(gccProps, compilerProps) {
} else {
res.set('Content-Type', 'text/plain');
try {
res.write("# Compilation provided by Compiler Explorer at " + req.get('Host') + "\n");
if (!_.isEmpty(textBanner)) res.write('# ' + textBanner + "\n");
res.write(textify(result.asm));
if (result.code !== 0) res.write("\n# Compiler exited with result code " + result.code);
if (!_.isEmpty(result.stdout)) res.write("\nStandard out:\n" + textify(result.stdout));