build: Warn to run gn clean after install-build-deps

Change-Id: Ied23ef970671cf2074c7d1775457485372b8eaac
diff --git a/tools/install-build-deps b/tools/install-build-deps
index ec40c34..e48d1cc 100755
--- a/tools/install-build-deps
+++ b/tools/install-build-deps
@@ -363,6 +363,7 @@
     deps += BUILD_DEPS_ANDROID + TEST_DEPS_ANDROID
   if args.ui:
     deps += UI_DEPS
+  deps_updated = False
   for rel_path, url, expected_sha1, platform in deps:
     if (platform != 'all' and platform != sys.platform):
       continue
@@ -377,6 +378,7 @@
     if ((not is_zip and HashLocalFile(local_path) == expected_sha1) or
         (is_zip and ReadFile(zip_dir_stamp) == expected_sha1)):
       continue
+    deps_updated = True
     MkdirRecursive(os.path.dirname(rel_path))
     if HashLocalFile(local_path) != expected_sha1:
       download_path = local_path + '.tmp'
@@ -427,6 +429,12 @@
     # Needs to happen after nodejs is installed above.
     InstallNodeModules()
 
+  if deps_updated:
+    # Stale binary files may be compiled against old sysroot headers that aren't
+    # tracked by gn.
+    logging.warn('Remember to run "gn clean <output_directory>" ' +
+                 'to avoid stale binary files.')
+
 if __name__ == '__main__':
   logging.basicConfig(level=logging.INFO)
   sys.exit(Main())