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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/NaClCompile.cs
diff --git a/visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/NaClCompile.cs b/visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/NaClCompile.cs
index cb4da6604103f6a73e09cb5aa98298bcb7dafb47..b213eb9cc7f9843689353d6ac7cfc38c04624c63 100644
--- a/visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/NaClCompile.cs
+++ b/visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/NaClCompile.cs
@@ -263,11 +263,27 @@ namespace NaCl.Build.CPPTasks
{
if (Platform.Equals("pnacl", StringComparison.OrdinalIgnoreCase))
{
- if (!GCCUtilities.FindPython())
+ if (!SDKUtilities.FindPython())
{
Log.LogError("PNaCl compilation requires python in your executable path.");
return -1;
}
+
+ // The SDK root is five levels up from the compiler binary.
+ string sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(pathToTool));
+ sdkroot = Path.GetDirectoryName(Path.GetDirectoryName(sdkroot));
+ sdkroot = Path.GetDirectoryName(sdkroot);
+
+ int revision;
+ int version = SDKUtilities.GetSDKVersion(sdkroot, out revision);
+ if (revision < SDKUtilities.MinPNaCLSDKVersion)
+ {
+ Log.LogError("The configured version of the NaCl SDK ({0} r{1}) is too old " +
+ "for building PNaCl projects.\n" +
+ "Please install at least 24 r{2} using the naclsdk command " +
+ "line tool.", version, revision, SDKUtilities.MinPNaCLSDKVersion);
+ return -1;
+ }
}
// If multiprocess complication is enabled (not the VS default)
binji 2012/10/31 06:36:22 sp: compilation
@@ -276,7 +292,7 @@ namespace NaCl.Build.CPPTasks
// gcc
if (MultiProcessorCompilation && ProcessorNumber != 1)
{
- if (!GCCUtilities.FindPython())
+ if (!SDKUtilities.FindPython())
{
MessageBox.Show("Multi-processor Compilation with NaCl requires that python " +
binji 2012/10/31 06:36:22 maybe this should be Log.LogError like above?
"be available in the visual studio executable path.\n" +

Powered by Google App Engine
This is Rietveld 408576698