Browse Source

Adding in LDC opt view support

dev/git-series/gccdum
jaredwy 5 years ago
parent
commit
69f10bf295
  1. 5
      Makefile
  2. 5
      d/Makefile
  3. 2
      lib/base-compiler.js
  4. 6
      lib/compilers/ldc.js
  5. 2
      static/opt-view.js

5
Makefile

@ -22,7 +22,8 @@ prereqs: optional-haskell-support optional-d-support optional-rust-support node_
GDC?=gdc
DMD?=dmd
ifneq "" "$(shell which $(GDC) 2>/dev/null || which $(DMD) 2>/dev/null)"
LDC?=ldc2
ifneq "" "$(shell which $(GDC) 2>/dev/null || which $(DMD) 2>/dev/null || which $(LDC) 2>/dev/null)"
optional-d-support:
$(MAKE) -C d
else
@ -80,7 +81,7 @@ clean:
$(MAKE) -C c-preload clean
run: prereqs
$(NODE) ./node_modules/.bin/supervisor -w app.js,lib,etc/config -e 'js|node|properties' --exec $(NODE) -- ./app.js --language $(LANG) $(EXTRA_ARGS)
$(NODE) ./node_modules/.bin/supervisor -w app.js,lib,etc/config -e 'js|node|properties' --exec $(NODE) $(NODE_ARGS) -- ./app.js --language $(LANG) $(EXTRA_ARGS)
HASH := $(shell git rev-parse HEAD)
dist: prereqs

5
d/Makefile

@ -1,10 +1,13 @@
GDC?=gdc
DMD?=dmd
LDC?=ldc2
demangle: demangle.d
ifneq "" "$(shell which ${DMD})"
$(DMD) -O -release $< -of$@
else
else ifneq "" "$(shell which ${GDC})"
$(GDC) -O2 $< -o $@
else
$(LDC) -O2 $< -of=$@
endif
clean:

2
lib/base-compiler.js

@ -36,7 +36,7 @@ var child_process = require('child_process'),
exec = require('./exec'),
logger = require('./logger').logger,
compilerOptInfo = require("compiler-opt-info"),
argumentParsers = require("./compilers//argument-parsers");
argumentParsers = require("./compilers/argument-parsers");
function Compile(compiler, env) {
this.compiler = compiler;

6
lib/compilers/ldc.js

@ -22,7 +22,8 @@
// 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 Compile = require('../base-compiler'),
argumentParsers = require("./argument-parsers");
function compileLdc(info, env) {
var compiler = new Compile(info, env);
@ -33,6 +34,9 @@ function compileLdc(info, env) {
if (!filters.binary) options = options.concat('-output-s');
return options;
};
compiler.getArgumentParser = function () {
return argumentParsers.clang;
};
return compiler.initialise();
}

2
static/opt-view.js

@ -43,7 +43,7 @@ define(function (require) {
this.code = state.source || "";
this._currentDecorations = [];
this.optEditor = monaco.editor.create(this.domRoot.find(".monaco-placeholder")[0], {
value: state.source || "",
value: this.code,
scrollBeyondLastLine: false,
language: 'cppp', //we only support cpp(p) for now
readOnly: true,

Loading…
Cancel
Save