Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / build / gyp_webrtc
index 7191c31..4d5ae79 100755 (executable)
@@ -23,6 +23,7 @@ sys.path.insert(0, os.path.join(checkout_root, 'build'))
 sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
 import gyp_chromium
 import gyp_helper
+import vs_toolchain
 
 sys.path.insert(0, os.path.join(checkout_root, 'tools', 'gyp', 'pylib'))
 import gyp
@@ -60,13 +61,15 @@ if __name__ == '__main__':
   if not os.environ.get('GYP_GENERATORS'):
     os.environ['GYP_GENERATORS'] = 'ninja'
 
-  vs2013_runtime_dll_dirs = gyp_chromium.DownloadVsToolChain()
+  vs2013_runtime_dll_dirs = None
+  if int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')):
+    vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
 
   # Enforce gyp syntax checking. This adds about 20% execution time.
   args.append('--check')
 
   supplemental_includes = gyp_chromium.GetSupplementalFiles()
-  gn_vars_dict = gyp_chromium.GetGypVarsForGN(supplemental_includes)
+  gn_vars_dict = gyp_chromium.GetGypVars(supplemental_includes)
 
   # Automatically turn on crosscompile support for platforms that need it.
   if all(('ninja' in os.environ.get('GYP_GENERATORS', ''),
@@ -74,8 +77,6 @@ if __name__ == '__main__':
           'GYP_CROSSCOMPILE' not in os.environ)):
     os.environ['GYP_CROSSCOMPILE'] = '1'
 
-  if not gyp_chromium.RunGN(gn_vars_dict):
-    sys.exit(1)
   args.extend(['-I' + i for i in
                gyp_chromium.additional_include_files(supplemental_includes,
                                                      args)])
@@ -91,7 +92,7 @@ if __name__ == '__main__':
 
   if vs2013_runtime_dll_dirs:
     x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
-    gyp_chromium.CopyVsRuntimeDlls(
+    vs_toolchain.CopyVsRuntimeDlls(
         os.path.join(checkout_root, gyp_chromium.GetOutputDirectory()),
         (x86_runtime, x64_runtime))