void SingleFileCompilation() { List <MethodDesc> rootMethods = new List <MethodDesc>(); MethodDesc entryPointMethod = null; EcmaModule entryPointModule = GetEntryPointModule(); if (entryPointModule != null) { int entryPointToken = entryPointModule.PEReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress; entryPointMethod = entryPointModule.GetMethod(MetadataTokens.EntityHandle(entryPointToken)); } Compilation compilation = new Compilation(_compilerTypeSystemContext, _options); compilation.Log = Console.Out; compilation.OutputPath = _outputPath; if (_options.IsCppCodeGen) { // Don't set Out when using object writer which is handled by LLVM. compilation.Out = new StreamWriter(File.Create(_outputPath)); } compilation.CompileSingleFile(entryPointMethod); }
private void SingleFileCompilation() { Compilation compilation = new Compilation(_options); compilation.Log = _options.Verbose ? Console.Out : TextWriter.Null; compilation.CompileSingleFile(); }
private void SingleFileCompilation() { List<MethodDesc> rootMethods = new List<MethodDesc>(); MethodDesc entryPointMethod = null; EcmaModule entryPointModule = GetEntryPointModule(); if (entryPointModule != null) { int entryPointToken = entryPointModule.PEReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress; entryPointMethod = entryPointModule.GetMethod(MetadataTokens.EntityHandle(entryPointToken)); } Compilation compilation = new Compilation(_compilerTypeSystemContext, _options); compilation.Log = Console.Out; compilation.OutputPath = _outputPath; if (_options.IsCppCodeGen) { // Don't set Out when using object writer which is handled by LLVM. compilation.Out = new StreamWriter(File.Create(_outputPath)); } compilation.CompileSingleFile(entryPointMethod); }