forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBooCompiler.cs
More file actions
44 lines (38 loc) · 1.45 KB
/
Copy pathBooCompiler.cs
File metadata and controls
44 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System.IO;
using System.Linq;
using System.Collections.Generic;
using UnityEditor.Utils;
namespace UnityEditor.Scripting.Compilers
{
class BooCompiler : MonoScriptCompilerBase
{
public BooCompiler(MonoIsland island, bool runUpdater) : base(island, runUpdater)
{
}
override protected Program StartCompiler()
{
var arguments = new List<string>
{
"-debug",
"-target:library",
"-out:" + _island._output,
"-x-type-inference-rule-attribute:" + typeof(UnityEngineInternal.TypeInferenceRuleAttribute)
};
foreach (string dll in _island._references)
arguments.Add("-r:" + PrepareFileName(dll));
foreach (string define in _island._defines.Distinct())
arguments.Add("-define:" + define);
foreach (string source in _island._files)
arguments.Add(PrepareFileName(source));
string compilerPath = Path.Combine(GetMonoProfileLibDirectory(), "booc.exe");
return StartCompiler(_island._target, compilerPath, arguments);
}
protected override CompilerOutputParserBase CreateOutputParser()
{
return new BooCompilerOutputParser();
}
}
}