diff --git a/app.js b/app.js index 6693d62c..5cec6ba3 100755 --- a/app.js +++ b/app.js @@ -36,26 +36,31 @@ var nopt = require('nopt'), Promise = require('promise'); var opts = nopt({ - 'env': [String], + 'env': [String, Array], 'rootDir': [String], 'language': [String], + 'port': [Number], 'propDebug': [Boolean] }); -var propHierarchy = [ - 'defaults', - opts.env || 'dev', - os.hostname()]; - var rootDir = opts.rootDir || './etc'; var language = opts.language || "C++"; +var env = opts.env || ['dev']; +var port = opts.port || 10240; + +var propHierarchy = ['defaults'].concat(env).concat([os.hostname()]); props.initialize(rootDir + '/config', propHierarchy); if (opts.propDebug) props.setDebug(true); var gccProps = props.propsFor("gcc-explorer"); -var compilerProps = props.propsFor(language.toLowerCase()); +var compilerPropsFunc = props.propsFor(language.toLowerCase()); +function compilerProps(property, defaultValue) { + // My kingdom for ccs... + var forCompiler = compilerPropsFunc(property, undefined); + if (forCompiler !== undefined) return forCompiler; + return gccProps(property, defaultValue); +} require('./lib/compile').initialise(gccProps, compilerProps); -var port = gccProps('port', 10240); var staticMaxAgeMs = gccProps('staticMaxAgeMs', 0); function initializeMemwatch() { diff --git a/etc/config/c++.amazon.properties b/etc/config/c++.amazon.properties new file mode 100644 index 00000000..7f35a71d --- /dev/null +++ b/etc/config/c++.amazon.properties @@ -0,0 +1,38 @@ +compilers=gcc1204@20480:clang350:clang351:g482:g492:g510:g520:ppcg48:aarchg48:armhfg482:clang37x:clang36x +############################### +# GCC for x86 +compiler.g492.exe=/usr/bin/g++-4.9 +compiler.g492.name=x86 gcc 4.9.2 +compiler.g510.exe=/opt/gcc-5.1.0/bin/g++ +compiler.g510.name=x86 gcc 5.1.0 +compiler.g520.exe=/opt/gcc-5.2.0/bin/g++ +compiler.g520.name=x86 gcc 5.2.0 +compiler.g482.exe=/usr/bin/g++-4.8 +compiler.g482.name=x86 gcc 4.8.2 +compiler.clang350.exe=/usr/bin/clang++-3.5 +compiler.clang350.name=x86 clang 3.5.0 +compiler.clang350.intelAsm=-masm=intel +compiler.clang351.exe=/opt/clang+llvm-3.5.1-x86_64-linux-gnu/bin/clang++ +compiler.clang351.name=x86 clang 3.5.1 +compiler.clang351.intelAsm=-masm=intel +compiler.clang352.exe=/opt/clang+llvm-3.5.2-x86_64-linux-gnu/bin/clang++ +compiler.clang352.name=x86 clang 3.5.2 +compiler.clang352.intelAsm=-masm=intel +compiler.clang36x.exe=/opt/clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ +compiler.clang36x.name=x86 clang 3.6 +compiler.clang36x.intelAsm=-masm=intel +compiler.clang37x.exe=/opt/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ +compiler.clang37x.name=x86 clang 3.7 +compiler.clang37x.intelAsm=-masm=intel + +############################### +# GCC for ppc +compiler.ppcg48.exe=/usr/bin/powerpc-linux-gnu-g++-4.8 +compiler.ppcg48.name=PowerPC gcc 4.8 + +############################### +# GCC for ARM +compiler.aarchg48.exe=/usr/bin/aarch64-linux-gnu-g++ +compiler.aarchg48.name=ARM64 gcc 4.8 +compiler.armhfg482.exe=/usr/bin/arm-linux-gnueabihf-g++ +compiler.armhfg482.name=ARM gcc 4.8.2 diff --git a/etc/config/gcc-explorer.amazon1204.properties b/etc/config/c++.amazon1204.properties similarity index 93% rename from etc/config/gcc-explorer.amazon1204.properties rename to etc/config/c++.amazon1204.properties index df759bfa..d3346c4e 100644 --- a/etc/config/gcc-explorer.amazon1204.properties +++ b/etc/config/c++.amazon1204.properties @@ -1,11 +1,3 @@ -# Settings for the 12.04 Amazon EC2 instance -port=20480 -compileTimeoutMs=2000 -compiler-wrapper=./c-preload/compiler-wrapper -max-asm-size=500000 -staticMaxAgeMs=600000 -cacheMb=50 -clientGoogleAnalyticsEnabled=true compilers=g447:g453:g464:g473:g481:g490:armg453:clang30:avrg453:armg463:icc1301:clang32:clang33:clang341:g490c1:g490c2 # msp430g453 - disabled for now since it hangs the client defaultCompiler=g490 diff --git a/etc/config/gcc-explorer.amazon-d.properties b/etc/config/d.amazon.properties similarity index 63% rename from etc/config/gcc-explorer.amazon-d.properties rename to etc/config/d.amazon.properties index 3b8c697a..52741923 100644 --- a/etc/config/gcc-explorer.amazon-d.properties +++ b/etc/config/d.amazon.properties @@ -1,6 +1,3 @@ -# Settings overridden for Amazon EC2 instances running D that power http://d.godbolt.org/ -port=10241 -compileTimeoutMs=2000 compilers=gdc44:gdc46:gdc49u:gdc49 defaultCompiler=gdc49 compiler.gdc44.exe=/usr/bin/gdc-4.4 @@ -15,12 +12,3 @@ compiler.gdc49u.name=gdc 4.9 (Ubuntu) compiler.gdc49.exe=/opt/x86_64-gdcproject-linux-gnu/bin/gdc compiler.gdc49.alias=/opt/x86_64-gdcproject-linux-gnu/bin/gdc compiler.gdc49.name=gdc 2.066.1 (4.9) - -compileFilename=example.d -postProcess=d/demangle -compiler-wrapper=./c-preload/compiler-wrapper -max-asm-size=500000 -staticMaxAgeMs=600000 -cacheMb=50 -language=D -clientGoogleAnalyticsEnabled=true diff --git a/etc/config/gcc-explorer.amazon-go.properties b/etc/config/gcc-explorer.amazon-go.properties deleted file mode 100644 index 9778ea95..00000000 --- a/etc/config/gcc-explorer.amazon-go.properties +++ /dev/null @@ -1,19 +0,0 @@ -# Settings overridden for Amazon EC2 instances that power http://go.godbolt.org/ -port=10243 -compileTimeoutMs=2000 -compiler-wrapper=./c-preload/compiler-wrapper -max-asm-size=1000000 -staticMaxAgeMs=600000 -cacheMb=50 -clientGoogleAnalyticsEnabled=true -language=go -defaultCompiler=gccgo - -compilers=gccgo491:6g141 -compileFilename=file.go -compiler.gccgo491.exe=/usr/bin/gccgo -compiler.gccgo491.name=x86 gccgo 4.9.1 -compiler.6g141.exe=/opt/go/pkg/tool/linux_amd64/6g -compiler.6g141.name=x86 6g 1.4.1 -compiler.6g141.versionFlag=-V -compiler.6g141.is6g=true diff --git a/etc/config/gcc-explorer.amazon.properties b/etc/config/gcc-explorer.amazon.properties index 0f010142..b73341dd 100644 --- a/etc/config/gcc-explorer.amazon.properties +++ b/etc/config/gcc-explorer.amazon.properties @@ -1,48 +1,9 @@ -# Settings overridden for Amazon EC2 instances that power http://gcc.godbolt.org/ -compileTimeoutMs=2000 +# Settings overridden for Amazon EC2 instances that power http://*.godbolt.org/ +compileTimeoutMs=5000 compiler-wrapper=./c-preload/compiler-wrapper -max-asm-size=500000 +max-asm-size=1000000 staticMaxAgeMs=600000 cacheMb=50 clientGoogleAnalyticsEnabled=true -compilers=gcc1204@20480:clang350:clang351:g482:g492:g510:g520:ppcg48:aarchg48:armhfg482:clang37x:clang36x proxyRetries=300 -proxyRetryMs=500 -defaultCompiler=g520 -############################### -# GCC for x86 -compiler.g492.exe=/usr/bin/g++-4.9 -compiler.g492.name=x86 gcc 4.9.2 -compiler.g510.exe=/opt/gcc-5.1.0/bin/g++ -compiler.g510.name=x86 gcc 5.1.0 -compiler.g520.exe=/opt/gcc-5.2.0/bin/g++ -compiler.g520.name=x86 gcc 5.2.0 -compiler.g482.exe=/usr/bin/g++-4.8 -compiler.g482.name=x86 gcc 4.8.2 -compiler.clang350.exe=/usr/bin/clang++-3.5 -compiler.clang350.name=x86 clang 3.5.0 -compiler.clang350.intelAsm=-masm=intel -compiler.clang351.exe=/opt/clang+llvm-3.5.1-x86_64-linux-gnu/bin/clang++ -compiler.clang351.name=x86 clang 3.5.1 -compiler.clang351.intelAsm=-masm=intel -compiler.clang352.exe=/opt/clang+llvm-3.5.2-x86_64-linux-gnu/bin/clang++ -compiler.clang352.name=x86 clang 3.5.2 -compiler.clang352.intelAsm=-masm=intel -compiler.clang36x.exe=/opt/clang+llvm-3.6.2-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ -compiler.clang36x.name=x86 clang 3.6 -compiler.clang36x.intelAsm=-masm=intel -compiler.clang37x.exe=/opt/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ -compiler.clang37x.name=x86 clang 3.7 -compiler.clang37x.intelAsm=-masm=intel - -############################### -# GCC for ppc -compiler.ppcg48.exe=/usr/bin/powerpc-linux-gnu-g++-4.8 -compiler.ppcg48.name=PowerPC gcc 4.8 - -############################### -# GCC for ARM -compiler.aarchg48.exe=/usr/bin/aarch64-linux-gnu-g++ -compiler.aarchg48.name=ARM64 gcc 4.8 -compiler.armhfg482.exe=/usr/bin/arm-linux-gnueabihf-g++ -compiler.armhfg482.name=ARM gcc 4.8.2 +proxyRetryMs=500 \ No newline at end of file diff --git a/etc/config/gcc-explorer.go.properties b/etc/config/gcc-explorer.go.properties deleted file mode 100644 index bcf58b1b..00000000 --- a/etc/config/gcc-explorer.go.properties +++ /dev/null @@ -1,3 +0,0 @@ -port=10243 -compileFilename=example.go -language=go diff --git a/etc/config/go.amazon.properties b/etc/config/go.amazon.properties new file mode 100644 index 00000000..72f99f3b --- /dev/null +++ b/etc/config/go.amazon.properties @@ -0,0 +1,9 @@ +defaultCompiler=gccgo +compilers=gccgo491:6g141 +compileFilename=file.go +compiler.gccgo491.exe=/usr/bin/gccgo +compiler.gccgo491.name=x86 gccgo 4.9.1 +compiler.6g141.exe=/opt/go/pkg/tool/linux_amd64/6g +compiler.6g141.name=x86 6g 1.4.1 +compiler.6g141.versionFlag=-V +compiler.6g141.is6g=true \ No newline at end of file diff --git a/etc/config/gcc-explorer.amazon-rust.properties b/etc/config/rust.amazon.properties similarity index 56% rename from etc/config/gcc-explorer.amazon-rust.properties rename to etc/config/rust.amazon.properties index c808729d..9dac695d 100644 --- a/etc/config/gcc-explorer.amazon-rust.properties +++ b/etc/config/rust.amazon.properties @@ -1,6 +1,3 @@ -# Settings overridden for Amazon EC2 instances running Rust that power http://rust.godbolt.org/ -port=10242 -compileTimeoutMs=5000 compilers=r110:r100:nightly defaultCompiler=r110 compiler.r110.exe=/opt/rust-1.1.0/bin/rustc @@ -12,11 +9,3 @@ compiler.r100.intelAsm=-Cllvm-args=--x86-asm-syntax=intel compiler.nightly.exe=/opt/rust-nightly/bin/rustc compiler.nightly.name=rustc nightly (version varies) compiler.nightly.intelAsm=-Cllvm-args=--x86-asm-syntax=intel -compileFilename=example.rs -compileToAsm=--emit asm --crate-type staticlib -compiler-wrapper=./c-preload/compiler-wrapper -max-asm-size=262144 -cacheMb=50 -language=Rust -options=-O --crate-type staticlib -clientGoogleAnalyticsEnabled=true