gn_config.patch 5.87 KB
Newer Older
1
diff --git .gn .gn
2
index 0591fc512d52..23d066a9254d 100644
3
4
--- .gn
+++ .gn
5
@@ -669,6 +669,8 @@ exec_script_whitelist =
6
7
       # in the Chromium repo outside of //build.
       "//build_overrides/build.gni",
8
 
9
10
+      "//cef/BUILD.gn",
+
11
       # TODO(dgn): Layer violation but breaks the build otherwise, see
12
13
       # https://crbug.com/474506.
       "//clank/java/BUILD.gn",
14
diff --git BUILD.gn BUILD.gn
15
index f50c9f99a36e..33be1efac8f0 100644
16
17
--- BUILD.gn
+++ BUILD.gn
18
@@ -189,6 +189,7 @@ group("gn_all") {
19
 
20
   if (!is_ios && !is_fuchsia) {
21
22
23
24
25
26
     deps += [
+      "//cef",
       "//chrome/test:telemetry_perf_unittests",
       "//chrome/test:unit_tests",
       "//components:components_browsertests",
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
27
index 982fbe8d3f0d..e757be4688f1 100644
28
29
30
--- build/config/win/visual_studio_version.gni
+++ build/config/win/visual_studio_version.gni
@@ -12,9 +12,8 @@ declare_args() {
31
   # Currently always "2015".
32
33
34
35
36
37
38
39
40
41
   visual_studio_version = ""
 
-  # Directory of the Windows driver kit. If visual_studio_path is empty, this
-  # will be auto-filled.
-  wdk_path = ""
+  # Path to Visual Studio runtime libraries.
+  visual_studio_runtime_dirs = ""
 
   # Full path to the Windows SDK, not including a backslash at the end.
   # This value is the default location, override if you have a different
42
@@ -28,12 +27,11 @@ if (visual_studio_path == "") {
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
   visual_studio_path = toolchain_data.vs_path
   windows_sdk_path = toolchain_data.sdk_path
   visual_studio_version = toolchain_data.vs_version
-  wdk_path = toolchain_data.wdk_dir
   visual_studio_runtime_dirs = toolchain_data.runtime_dirs
 } else {
   assert(visual_studio_version != "",
          "You must set the visual_studio_version if you set the path")
-  assert(wdk_path != "",
-         "You must set the wdk_path if you set the visual studio path")
-  visual_studio_runtime_dirs = []
+  assert(visual_studio_runtime_dirs != "",
+         "You must set the visual_studio_runtime_dirs if you set the visual " +
+         "studio path")
 }
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
59
index 2c8675206f31..d3e419d8fe98 100644
60
61
--- build/toolchain/win/setup_toolchain.py
+++ build/toolchain/win/setup_toolchain.py
62
@@ -134,22 +134,25 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
63
64
65
       # variable.
       if 'VSINSTALLDIR' in os.environ:
         del os.environ['VSINSTALLDIR']
66
-      other_path = os.path.normpath(os.path.join(
67
68
69
+      script_path = os.path.normpath(os.path.join(
                                         os.environ['GYP_MSVS_OVERRIDE_PATH'],
                                         'VC/Auxiliary/Build/vcvarsall.bat'))
70
71
72
73
-      if not os.path.exists(other_path):
-        raise Exception('%s is missing - make sure VC++ tools are installed.' %
-                        script_path)
-      script_path = other_path
74
75
76
77
78
79
80
81
-    cpu_arg = "amd64"
-    if (cpu != 'x64'):
-      # x64 is default target CPU thus any other CPU requires a target set
-      cpu_arg += '_' + cpu
-    args = [script_path, cpu_arg]
-    # Store target must come before any SDK version declaration
-    if (target_store):
-      args.append(['store'])
82
83
-    variables = _LoadEnvFromBat(args)
+    if os.path.exists(script_path):
84
85
86
87
88
89
90
91
+      cpu_arg = "amd64"
+      if (cpu != 'x64'):
+        # x64 is default target CPU thus any other CPU requires a target set
+        cpu_arg += '_' + cpu
+      args = [script_path, cpu_arg]
+      # Store target must come before any SDK version declaration
+      if (target_store):
+        args.append(['store'])
92
93
94
95
96
97
+      variables = _LoadEnvFromBat(args)
+    else:
+      variables = []
+      for k in sorted(os.environ.keys()):
+        variables.append('%s=%s' % (str(k), str(os.environ[k])))
+      variables = '\n'.join(variables)
98
+
99
100
101
   return _ExtractImportantEnvironment(variables)
 
 
102
diff --git build/vs_toolchain.py build/vs_toolchain.py
103
index 1ab7be527726..1467d18c1a81 100755
104
105
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
106
@@ -76,11 +76,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
     runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
     os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
   elif sys.platform == 'win32' and not depot_tools_win_toolchain:
+    has_override_path = True
     if not 'GYP_MSVS_OVERRIDE_PATH' in os.environ:
+      has_override_path = False
       os.environ['GYP_MSVS_OVERRIDE_PATH'] = DetectVisualStudioPath()
     if not 'GYP_MSVS_VERSION' in os.environ:
       os.environ['GYP_MSVS_VERSION'] = GetVisualStudioVersion()
 
+    if has_override_path:
+      # Don't attempt to copy DLLs when using a custom toolchain.
+      # The DLLs should already be discoverable via the PATH env variable.
+      return None
+
     # When using an installed toolchain these files aren't needed in the output
     # directory in order to run binaries locally, but they are needed in order
     # to create isolates or the mini_installer. Copying them to the output
125
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
126
index ca18ca7ca65b..b51ebadccd0d 100644
127
128
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
129
@@ -263,7 +263,7 @@ template("chrome_paks") {
130
131
132
133
     }
 
     input_locales = locales
-    output_dir = "${invoker.output_dir}/locales"
134
+    output_dir = "${invoker.output_dir}/chrome-locales"
135
136
137
 
     if (is_mac) {
       output_locales = locales_as_mac_outputs
138
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
139
index ec629333b006..981f3f26548d 100644
140
141
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
142
@@ -134,7 +134,7 @@ template("generate_mini_installer") {
143
144
145
146
     inputs = [
       "$chrome_dll_file",
       "$root_out_dir/chrome.exe",
-      "$root_out_dir/locales/en-US.pak",
147
+      "$root_out_dir/chrome-locales/en-US.pak",
148
       "$root_out_dir/setup.exe",
149
       "//chrome/tools/build/win/makecab.py",
150
       release_file,