2016-06-23 19:42:00 +02:00
|
|
|
diff --git .gn .gn
|
2018-09-04 11:43:21 +02:00
|
|
|
index 6fd17634ee87..0563b730a180 100644
|
2016-06-23 19:42:00 +02:00
|
|
|
--- .gn
|
|
|
|
+++ .gn
|
2018-09-04 11:43:21 +02:00
|
|
|
@@ -411,6 +411,8 @@ exec_script_whitelist =
|
2017-01-23 18:36:54 +01:00
|
|
|
# in the Chromium repo outside of //build.
|
|
|
|
"//build_overrides/build.gni",
|
2016-10-17 20:14:44 +02:00
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
+ "//cef/BUILD.gn",
|
|
|
|
+
|
2017-01-23 18:36:54 +01:00
|
|
|
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
2017-04-20 21:28:17 +02:00
|
|
|
# https://crbug.com/474506.
|
|
|
|
"//clank/java/BUILD.gn",
|
2016-06-23 19:42:00 +02:00
|
|
|
diff --git BUILD.gn BUILD.gn
|
2018-09-04 11:43:21 +02:00
|
|
|
index fd7e05257f9a..89d9e6c53d06 100644
|
2016-06-23 19:42:00 +02:00
|
|
|
--- BUILD.gn
|
|
|
|
+++ BUILD.gn
|
2018-09-04 11:43:21 +02:00
|
|
|
@@ -187,6 +187,7 @@ group("gn_all") {
|
2018-02-15 01:12:09 +01:00
|
|
|
|
2017-05-31 17:33:30 +02:00
|
|
|
if (!is_ios && !is_fuchsia) {
|
2016-06-23 19:42:00 +02:00
|
|
|
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
|
2017-09-06 23:40:58 +02:00
|
|
|
index 982fbe8d3f0d..e757be4688f1 100644
|
2016-06-23 19:42:00 +02:00
|
|
|
--- build/config/win/visual_studio_version.gni
|
|
|
|
+++ build/config/win/visual_studio_version.gni
|
|
|
|
@@ -12,9 +12,8 @@ declare_args() {
|
2016-11-23 21:54:29 +01:00
|
|
|
# Currently always "2015".
|
2016-06-23 19:42:00 +02:00
|
|
|
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
|
2016-07-06 21:34:09 +02:00
|
|
|
@@ -28,12 +27,11 @@ if (visual_studio_path == "") {
|
2016-06-23 19:42:00 +02:00
|
|
|
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")
|
|
|
|
}
|
2018-05-21 14:54:08 +02:00
|
|
|
diff --git build/toolchain/win/BUILD.gn build/toolchain/win/BUILD.gn
|
2018-09-04 11:43:21 +02:00
|
|
|
index 3c6c9d05d2c8..d475747fa12d 100644
|
2018-05-21 14:54:08 +02:00
|
|
|
--- build/toolchain/win/BUILD.gn
|
|
|
|
+++ build/toolchain/win/BUILD.gn
|
|
|
|
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
|
|
|
|
import("//build/config/compiler/compiler.gni")
|
|
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
|
|
import("//build/config/win/visual_studio_version.gni")
|
|
|
|
+import("//build/toolchain/cc_wrapper.gni")
|
|
|
|
import("//build/toolchain/clang_static_analyzer.gni")
|
|
|
|
import("//build/toolchain/goma.gni")
|
|
|
|
import("//build/toolchain/toolchain.gni")
|
|
|
|
@@ -28,6 +29,8 @@ if (use_goma) {
|
|
|
|
} else {
|
|
|
|
goma_prefix = "$goma_dir/gomacc "
|
|
|
|
}
|
|
|
|
+} else if (cc_wrapper != "") {
|
|
|
|
+ goma_prefix = "$cc_wrapper "
|
|
|
|
} else {
|
|
|
|
goma_prefix = ""
|
|
|
|
}
|
2018-07-09 17:35:26 +02:00
|
|
|
@@ -108,7 +111,7 @@ template("msvc_toolchain") {
|
|
|
|
|
|
|
|
# lld-link includes a replacement for lib.exe that can produce thin
|
|
|
|
# archives and understands bitcode (for lto builds).
|
|
|
|
- lib = "$prefix/$lld_link /lib /llvmlibthin"
|
|
|
|
+ lib = "$prefix/$lld_link /lib"
|
|
|
|
link = "$prefix/$lld_link"
|
|
|
|
if (host_os != "win") {
|
|
|
|
# See comment adding --rsp-quoting to $cl above for more information.
|
2016-06-23 19:42:00 +02:00
|
|
|
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
2018-07-02 19:11:49 +02:00
|
|
|
index 1ba5533c3efb..abfd55a2c703 100644
|
2016-06-23 19:42:00 +02:00
|
|
|
--- build/toolchain/win/setup_toolchain.py
|
|
|
|
+++ build/toolchain/win/setup_toolchain.py
|
2018-05-21 14:54:08 +02:00
|
|
|
@@ -134,25 +134,28 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
|
2017-04-20 21:28:17 +02:00
|
|
|
# variable.
|
|
|
|
if 'VSINSTALLDIR' in os.environ:
|
|
|
|
del os.environ['VSINSTALLDIR']
|
2017-03-03 23:37:23 +01:00
|
|
|
- other_path = os.path.normpath(os.path.join(
|
2017-10-20 19:45:20 +02:00
|
|
|
- os.environ['GYP_MSVS_OVERRIDE_PATH'],
|
|
|
|
- 'VC/Auxiliary/Build/vcvarsall.bat'))
|
2017-03-03 23:37:23 +01:00
|
|
|
- if not os.path.exists(other_path):
|
|
|
|
- raise Exception('%s is missing - make sure VC++ tools are installed.' %
|
|
|
|
- script_path)
|
|
|
|
- script_path = other_path
|
2018-04-19 17:44:42 +02:00
|
|
|
- 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'])
|
2018-05-21 14:54:08 +02:00
|
|
|
- # Chromium requires the 10.0.17134.0 SDK - previous versions don't have
|
|
|
|
- # all of the required declarations.
|
|
|
|
- args.append('10.0.17134.0')
|
2016-06-23 19:42:00 +02:00
|
|
|
- variables = _LoadEnvFromBat(args)
|
2017-10-20 19:45:20 +02:00
|
|
|
+ script_path = os.path.normpath(os.path.join(
|
|
|
|
+ os.environ['GYP_MSVS_OVERRIDE_PATH'],
|
|
|
|
+ 'VC/Auxiliary/Build/vcvarsall.bat'))
|
2016-06-23 19:42:00 +02:00
|
|
|
+ if os.path.exists(script_path):
|
2018-04-19 17:44:42 +02:00
|
|
|
+ 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'])
|
2018-05-21 14:54:08 +02:00
|
|
|
+ # Chromium requires the 10.0.17134.0 SDK - previous versions don't have
|
|
|
|
+ # all of the required declarations.
|
|
|
|
+ args.append('10.0.17134.0')
|
2016-06-23 19:42:00 +02:00
|
|
|
+ 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)
|
2017-07-27 01:19:27 +02:00
|
|
|
+
|
2016-06-23 19:42:00 +02:00
|
|
|
return _ExtractImportantEnvironment(variables)
|
|
|
|
|
|
|
|
|
2016-08-25 17:37:53 +02:00
|
|
|
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
2018-06-19 00:08:20 +02:00
|
|
|
index 83847f456676..bf6254a0ebb6 100755
|
2016-08-25 17:37:53 +02:00
|
|
|
--- build/vs_toolchain.py
|
|
|
|
+++ build/vs_toolchain.py
|
2018-06-19 00:08:20 +02:00
|
|
|
@@ -68,11 +68,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
2016-08-25 17:37:53 +02:00
|
|
|
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
|
2016-10-21 21:52:29 +02:00
|
|
|
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
2018-08-09 22:18:24 +02:00
|
|
|
index 8b3d1652ae28..9d69220d85df 100644
|
2016-10-21 21:52:29 +02:00
|
|
|
--- chrome/chrome_paks.gni
|
|
|
|
+++ chrome/chrome_paks.gni
|
2018-08-09 22:18:24 +02:00
|
|
|
@@ -259,7 +259,7 @@ template("chrome_paks") {
|
2017-07-27 01:19:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
input_locales = locales
|
|
|
|
- output_dir = "${invoker.output_dir}/locales"
|
|
|
|
+ output_dir = "${invoker.output_dir}/chrome/locales"
|
|
|
|
|
|
|
|
if (is_mac) {
|
|
|
|
output_locales = locales_as_mac_outputs
|
2016-06-23 19:42:00 +02:00
|
|
|
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
2018-08-09 22:18:24 +02:00
|
|
|
index 931761ff27de..a181fbeadc86 100644
|
2016-06-23 19:42:00 +02:00
|
|
|
--- chrome/installer/mini_installer/BUILD.gn
|
|
|
|
+++ chrome/installer/mini_installer/BUILD.gn
|
2018-04-19 17:44:42 +02:00
|
|
|
@@ -133,7 +133,7 @@ template("generate_mini_installer") {
|
2016-07-06 21:34:09 +02:00
|
|
|
inputs = [
|
|
|
|
"$chrome_dll_file",
|
|
|
|
"$root_out_dir/chrome.exe",
|
|
|
|
- "$root_out_dir/locales/en-US.pak",
|
|
|
|
+ "$root_out_dir/chrome/locales/en-US.pak",
|
|
|
|
"$root_out_dir/setup.exe",
|
2018-02-15 01:12:09 +01:00
|
|
|
"//chrome/tools/build/win/makecab.py",
|
2018-03-20 21:15:08 +01:00
|
|
|
release_file,
|