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

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

Issue 11475048: [NaCl SDK Addin] Fix detection of PNaCl toolchain. (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: fix long long Created 8 years 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
« no previous file with comments | « no previous file | visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/SDKUtilities.cs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 using System; 4 using System;
5 using System.Collections.Generic; 5 using System.Collections.Generic;
6 using System.Text; 6 using System.Text;
7 using System.Collections; 7 using System.Collections;
8 using System.IO; 8 using System.IO;
9 using System.Reflection; 9 using System.Reflection;
10 using System.Resources; 10 using System.Resources;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 271
272 // The SDK root is five levels up from the compiler binary. 272 // The SDK root is five levels up from the compiler binary.
273 string sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(pat hToTool)); 273 string sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(pat hToTool));
274 sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(sdkroot)); 274 sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(sdkroot));
275 sdkroot = Path.GetDirectoryName(sdkroot); 275 sdkroot = Path.GetDirectoryName(sdkroot);
276 276
277 int revision; 277 if (!SDKUtilities.SupportsPNaCl(sdkroot))
278 int version = SDKUtilities.GetSDKVersion(sdkroot, out revision);
279 if (revision < SDKUtilities.MinPNaCLSDKVersion)
280 { 278 {
279 int revision;
280 int version = SDKUtilities.GetSDKVersion(sdkroot, out revisi on);
281 Log.LogError("The configured version of the NaCl SDK ({0} r{ 1}) is too old " + 281 Log.LogError("The configured version of the NaCl SDK ({0} r{ 1}) is too old " +
282 "for building PNaCl projects.\n" + 282 "for building PNaCl projects.\n" +
283 "Please install at least 24 r{2} using the nacl sdk command " + 283 "Please install at least 24 r{2} using the nacl sdk command " +
284 "line tool.", version, revision, SDKUtilities.M inPNaCLSDKVersion); 284 "line tool.", version, revision, SDKUtilities.M inPNaCLSDKVersion,
285 SDKUtilities.MinPNaCLSDKRevision);
285 return -1; 286 return -1;
286 } 287 }
287 } 288 }
288 289
289 // If multiprocess compilation is enabled (not the VS default) 290 // If multiprocess compilation is enabled (not the VS default)
290 // and the number of processors to use is not 1, then use the 291 // and the number of processors to use is not 1, then use the
291 // compiler_wrapper python script to run multiple instances of 292 // compiler_wrapper python script to run multiple instances of
292 // gcc 293 // gcc
293 if (MultiProcessorCompilation && ProcessorNumber != 1) 294 if (MultiProcessorCompilation && ProcessorNumber != 1)
294 { 295 {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 protected override string ToolName 539 protected override string ToolName
539 { 540 {
540 get 541 get
541 { 542 {
542 return NaCLCompilerPath; 543 return NaCLCompilerPath;
543 } 544 }
544 } 545 }
545 546
546 } 547 }
547 } 548 }
OLDNEW
« no previous file with comments | « no previous file | visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/SDKUtilities.cs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698