|
|
|
@ -446,12 +446,23 @@ function compileRust(info, env) {
|
|
|
|
|
compiler.optionsForFilter = function (filters, outputFilename) {
|
|
|
|
|
var options = ['-g', '-o', this.filename(outputFilename)];
|
|
|
|
|
// TODO: binary not supported(?)
|
|
|
|
|
if (filters.binary) options = options.concat('--emit', 'asm');
|
|
|
|
|
if (!filters.binary) options = options.concat('--emit', 'asm');
|
|
|
|
|
options = options.concat(['--crate-type', 'staticlib']);
|
|
|
|
|
return options;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function compileLdc(info, env) {
|
|
|
|
|
var compiler = new Compile(info, env);
|
|
|
|
|
// TODO this needs testing!
|
|
|
|
|
compiler.optionsForFilter = function (filters, outputFilename) {
|
|
|
|
|
var options = ['-g', '-of', this.filename(outputFilename)];
|
|
|
|
|
if (filters.intel && !filters.binary) options.concat('-x86-asm-syntax=intel');
|
|
|
|
|
if (!filters.binary) options = options.concat('-output-s');
|
|
|
|
|
return options;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var compileFactories = {
|
|
|
|
|
"": function (info, env) {
|
|
|
|
|
var comp = new Compile(info, env);
|
|
|
|
@ -459,7 +470,8 @@ var compileFactories = {
|
|
|
|
|
},
|
|
|
|
|
"CL": compileCl,
|
|
|
|
|
"6g": compile6g,
|
|
|
|
|
"rust": compileRust
|
|
|
|
|
"rust": compileRust,
|
|
|
|
|
"ldc": compileLdc
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function CompileHandler() {
|
|
|
|
|