Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/NaClCompile.cs

Issue 11340059: [VS Addin] Disable PNaCl adding tests until newer SDK is available (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 using System; 2 using System;
3 using System.Collections.Generic; 3 using System.Collections.Generic;
4 using System.Text; 4 using System.Text;
5 using System.Collections; 5 using System.Collections;
6 using System.IO; 6 using System.IO;
7 using System.Reflection; 7 using System.Reflection;
8 using System.Resources; 8 using System.Resources;
9 using System.Windows.Forms; 9 using System.Windows.Forms;
10 using Microsoft.Build.Framework; 10 using Microsoft.Build.Framework;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 } 257 }
258 258
259 return mergedSources.ToArray(); 259 return mergedSources.ToArray();
260 } 260 }
261 261
262 private int Compile(string pathToTool) 262 private int Compile(string pathToTool)
263 { 263 {
264 if (Platform.Equals("pnacl", StringComparison.OrdinalIgnoreCase)) 264 if (Platform.Equals("pnacl", StringComparison.OrdinalIgnoreCase))
265 { 265 {
266 if (!GCCUtilities.FindPython()) 266 if (!SDKUtilities.FindPython())
267 { 267 {
268 Log.LogError("PNaCl compilation requires python in your exec utable path."); 268 Log.LogError("PNaCl compilation requires python in your exec utable path.");
269 return -1; 269 return -1;
270 } 270 }
271
272 // The SDK root is five levels up from the compiler binary.
273 string sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(pat hToTool));
274 sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(sdkroot));
275 sdkroot = Path.GetDirectoryName(sdkroot);
276
277 int revision;
278 int version = SDKUtilities.GetSDKVersion(sdkroot, out revision);
279 if (revision < SDKUtilities.MinPNaCLSDKVersion)
280 {
281 Log.LogError("The configured version of the NaCl SDK ({0} r{ 1}) is too old " +
282 "for building PNaCl projects.\n" +
283 "Please install at least 24 r{2} using the nacl sdk command " +
284 "line tool.", version, revision, SDKUtilities.M inPNaCLSDKVersion);
285 return -1;
286 }
271 } 287 }
272 288
273 // If multiprocess complication is enabled (not the VS default) 289 // If multiprocess complication is enabled (not the VS default)
binji 2012/10/31 06:36:22 sp: compilation
274 // and the number of processors to use is not 1, then use the 290 // and the number of processors to use is not 1, then use the
275 // compiler_wrapper python script to run multiple instances of 291 // compiler_wrapper python script to run multiple instances of
276 // gcc 292 // gcc
277 if (MultiProcessorCompilation && ProcessorNumber != 1) 293 if (MultiProcessorCompilation && ProcessorNumber != 1)
278 { 294 {
279 if (!GCCUtilities.FindPython()) 295 if (!SDKUtilities.FindPython())
280 { 296 {
281 MessageBox.Show("Multi-processor Compilation with NaCl requi res that python " + 297 MessageBox.Show("Multi-processor Compilation with NaCl requi res that python " +
binji 2012/10/31 06:36:22 maybe this should be Log.LogError like above?
282 "be available in the visual studio executabl e path.\n" + 298 "be available in the visual studio executabl e path.\n" +
283 "Please disable Multi-processor Compilation in the project " + 299 "Please disable Multi-processor Compilation in the project " +
284 "properties or add python to the your execut able path.\n" + 300 "properties or add python to the your execut able path.\n" +
285 "Falling back to serial compilation.\n"); 301 "Falling back to serial compilation.\n");
286 } 302 }
287 else 303 else
288 { 304 {
289 return CompileParallel(pathToTool); 305 return CompileParallel(pathToTool);
290 } 306 }
291 } 307 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 protected override string ToolName 539 protected override string ToolName
524 { 540 {
525 get 541 get
526 { 542 {
527 return NaCLCompilerPath; 543 return NaCLCompilerPath;
528 } 544 }
529 } 545 }
530 546
531 } 547 }
532 } 548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698