64-bit Windows support for NaCl: update NaCl revision in Chrome, enable the 64-bit loader code and fix some build issues.

Review URL: http://codereview.chromium.org/651065

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40062 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/DEPS b/DEPS
index 5f3400e..2781956 100644
--- a/DEPS
+++ b/DEPS
@@ -6,6 +6,7 @@
   "skia_revision": "504",
   "chromium_git": "http://src.chromium.org/git",
   "swig_revision": "37274",
+  "nacl_revision": "1569",
 }
 
 deps = {
@@ -43,7 +44,7 @@
     "http://v8.googlecode.com/svn/trunk@3944",
 
   "src/native_client":
-    "http://nativeclient.googlecode.com/svn/trunk/src/native_client@1511",
+    "http://nativeclient.googlecode.com/svn/trunk/src/native_client@" + Var("nacl_revision"),
 
   "src/third_party/skia/src":
     "http://skia.googlecode.com/svn/trunk/src@" + Var("skia_revision"),
@@ -141,6 +142,11 @@
 
     "src/third_party/swig/win":
       "/trunk/deps/third_party/swig/win@" + Var("swig_revision"),
+
+    "src/third_party/mingw-w64/mingw/bin":
+      ("http://nativeclient.googlecode.com/svn/trunk/src/third_party/mingw-w64/mingw/bin@" +
+       Var("nacl_revision")),
+
   },
   "mac": {
     "src/chrome/tools/test/reference_build/chrome_mac":
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 2b4952db..fe6cd31 100755
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -37,6 +37,11 @@
       'defines': [
         '<@(nacl_defines)',
       ],
+      'direct_dependent_settings': {
+        'defines': [
+          '<@(nacl_defines)',
+        ],
+      },
       'sources': [
         # All .cc, .h, .m, and .mm files under browser except for tests and
         # mocks.
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index 4c22c421..155c8d2 100755
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -33,6 +33,11 @@
       'defines': [
         '<@(nacl_defines)',
       ],
+      'direct_dependent_settings': {
+        'defines': [
+          '<@(nacl_defines)',
+        ],
+      },
       'sources': [
         # TODO(jrg): to link ipc_tests, these files need to be in renderer.a.
         # But app/ is the wrong directory for them.
diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi
index 1858f970..ff926b3 100644
--- a/chrome/nacl.gypi
+++ b/chrome/nacl.gypi
@@ -35,11 +35,17 @@
               '__STD_C',
               '_CRT_SECURE_NO_DEPRECATE',
               '_SCL_SECURE_NO_DEPRECATE',
+              '__STDC_LIMIT_MACROS=1',
             ],
             'include_dirs': [
               'third_party/wtl/include',
             ],
           },],
+          ['OS=="linux"', {
+            'defines': [
+              '__STDC_LIMIT_MACROS=1',
+            ],
+          },],
         ],
       }],
     ],
@@ -69,6 +75,13 @@
         '../native_client/src/trusted/validator_x86/validator_x86.gyp:ncvalidate',
         '../native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib',
       ],
+      'direct_dependent_settings': {
+        'defines': [
+          'NACL_BLOCK_SHIFT=5',
+          'NACL_BLOCK_SIZE=32',
+          '<@(nacl_defines)',
+        ],
+      },
     },
   ],
   'conditions': [
@@ -88,6 +101,9 @@
             'chrome_resources',
             'chrome_strings',
             'common_nacl_win64',
+            '../native_client/src/trusted/plugin/plugin.gyp:npGoogleNaClPluginChrome64',
+            '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel64',
+            '../native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib64',
           ],
           'sources': [
             'nacl/broker_thread.cc',
@@ -101,6 +117,13 @@
               'msvs_target_platform': 'x64',
             },
           },
+          'direct_dependent_settings': {
+            'defines': [
+              'NACL_BLOCK_SHIFT=5',
+              'NACL_BLOCK_SIZE=32',
+              '<@(nacl_defines)',
+            ],
+          },
         },
       ],
     }],
diff --git a/chrome/nacl/sel_main.cc b/chrome/nacl/sel_main.cc
index 4a2427b..5086d1e 100644
--- a/chrome/nacl/sel_main.cc
+++ b/chrome/nacl/sel_main.cc
@@ -54,10 +54,6 @@
 }
 
 int SelMain(const int desc, const NaClHandle handle) {
-#ifdef _WIN64
-  /* TODO(gregoryd): remove this when NaCl's service_runtime supports Win64 */
-  return 0;
-#else
   char *av[1];
   int ac = 1;
 
@@ -204,6 +200,5 @@
   NaClAllModulesFini();
 
   return ret_code;
-#endif
 }