OLD | NEW |
1 | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 using System; | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
3 using System.Collections.Generic; | 4 using System.Collections.Generic; |
4 using System.Linq; | 5 using System.Linq; |
5 using System.Text; | 6 using System.Text; |
6 using System.Collections; | 7 using System.Collections; |
7 using System.IO; | 8 using System.IO; |
8 using System.Reflection; | 9 using System.Reflection; |
9 using System.Resources; | 10 using System.Resources; |
10 using System.Text.RegularExpressions; | 11 using System.Text.RegularExpressions; |
11 using System.Diagnostics; | 12 using System.Diagnostics; |
12 | 13 |
(...skipping 14 matching lines...) Expand all Loading... |
27 public string PropertiesFile { get; set; } | 28 public string PropertiesFile { get; set; } |
28 | 29 |
29 [Required] | 30 [Required] |
30 public virtual string OutputFile { get; set; } | 31 public virtual string OutputFile { get; set; } |
31 | 32 |
32 [Required] | 33 [Required] |
33 public string OutputCommandLine { get; set; } | 34 public string OutputCommandLine { get; set; } |
34 | 35 |
35 [Required] | 36 [Required] |
36 public virtual ITaskItem[] Sources { get; set; } | 37 public virtual ITaskItem[] Sources { get; set; } |
37 | |
38 | 38 |
39 public NaClLib() | 39 public NaClLib() |
40 : base(new ResourceManager("NaCl.Build.CPPTasks.Properties.Resources
", Assembly.GetExecutingAssembly())) | 40 : base(new ResourceManager("NaCl.Build.CPPTasks.Properties.Resources
", Assembly.GetExecutingAssembly())) |
41 { | 41 { |
42 this.EnvironmentVariables = new string[] { "CYGWIN=nodosfilewarning",
"LC_CTYPE=C" }; | 42 this.EnvironmentVariables = new string[] { "CYGWIN=nodosfilewarning",
"LC_CTYPE=C" }; |
43 } | 43 } |
44 | 44 |
45 protected override string GenerateResponseFileCommands() | 45 protected override string GenerateResponseFileCommands() |
46 { | 46 { |
47 StringBuilder responseFileCmds = new StringBuilder(GCCUtilities.s_Co
mmandLineLength); | 47 StringBuilder responseFileCmds = new StringBuilder(GCCUtilities.s_Co
mmandLineLength); |
48 responseFileCmds.Append("rcs "); | 48 responseFileCmds.Append("rcs "); |
49 responseFileCmds.Append(GCCUtilities.ConvertPathWindowsToPosix(Outpu
tFile)); | 49 responseFileCmds.Append(GCCUtilities.ConvertPathWindowsToPosix(Outpu
tFile)); |
50 | 50 |
51 foreach (ITaskItem item in Sources) | 51 foreach (ITaskItem item in Sources) |
52 { | 52 { |
53 responseFileCmds.Append(" "); | 53 responseFileCmds.Append(" "); |
54 responseFileCmds.Append(GCCUtilities.ConvertPathWindowsToPosix(i
tem.ToString())); | 54 responseFileCmds.Append(GCCUtilities.ConvertPathWindowsToPosix(i
tem.ToString())); |
55 } | 55 } |
56 return responseFileCmds.ToString(); | 56 return responseFileCmds.ToString(); |
57 } | 57 } |
58 | 58 |
59 protected override int ExecuteTool(string pathToTool, string responseFil
eCommands, string commandLineCommands) | 59 protected override int ExecuteTool(string pathToTool, string responseFil
eCommands, string commandLineCommands) |
60 { | 60 { |
61 if (OutputCommandLine == "true") | 61 if (OutputCommandLine == "true") |
62 { | 62 { |
63 Log.LogMessage(MessageImportance.High, pathToTool + " " + respo
nseFileCommands); | 63 Log.LogMessage(MessageImportance.High, pathToTool + " " + respo
nseFileCommands); |
64 } | 64 } |
65 | 65 |
66 return base.ExecuteTool(pathToTool, responseFileCommands, commandLin
eCommands); | 66 return base.ExecuteTool(pathToTool, responseFileCommands, commandLin
eCommands); |
67 } | 67 } |
68 | 68 |
69 | 69 |
70 | 70 |
71 public virtual string PlatformToolset | 71 public virtual string PlatformToolset |
72 { | 72 { |
73 get | 73 get |
74 { | 74 { |
75 return "GCC"; | 75 return "GCC"; |
76 } | 76 } |
77 } | 77 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 get | 129 get |
130 { | 130 { |
131 return "default.link.command.tlog"; | 131 return "default.link.command.tlog"; |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 protected override string[] ReadTLogNames | 135 protected override string[] ReadTLogNames |
136 { | 136 { |
137 get | 137 get |
138 { | 138 { |
139 return new string[] | 139 return new string[] |
140 { | 140 { |
141 "default.link.read.tlog" | 141 "default.link.read.tlog" |
142 }; | 142 }; |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 protected override string[] WriteTLogNames | 146 protected override string[] WriteTLogNames |
147 { | 147 { |
148 get | 148 get |
149 { | 149 { |
150 return new string[] | 150 return new string[] |
151 { | 151 { |
152 "default.link.write.tlog" | 152 "default.link.write.tlog" |
153 }; | 153 }; |
154 } | 154 } |
155 } | 155 } |
156 | 156 |
157 public string TrackerLogDirectory { get; set; } | 157 public string TrackerLogDirectory { get; set; } |
158 } | 158 } |
159 | 159 |
160 | 160 |
161 } | 161 } |
OLD | NEW |