diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/build/toolchain/win | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/build/toolchain/win')
-rw-r--r-- | chromium/build/toolchain/win/BUILD.gn | 10 | ||||
-rw-r--r-- | chromium/build/toolchain/win/midl.gni | 2 | ||||
-rw-r--r-- | chromium/build/toolchain/win/midl.py | 10 | ||||
-rw-r--r-- | chromium/build/toolchain/win/setup_toolchain.py | 8 |
4 files changed, 25 insertions, 5 deletions
diff --git a/chromium/build/toolchain/win/BUILD.gn b/chromium/build/toolchain/win/BUILD.gn index 0c356e16296..be0893059aa 100644 --- a/chromium/build/toolchain/win/BUILD.gn +++ b/chromium/build/toolchain/win/BUILD.gn @@ -446,12 +446,20 @@ template("win_toolchains") { environment = "environment." + toolchain_arch prefix = rebase_path("$clang_base_path/bin", root_build_dir) cl = "${clang_prefix}$prefix/${clang_cl}" + _clang_lib_dir = + rebase_path("$clang_base_path/lib/clang/$clang_version/lib/windows", + root_build_dir) if (host_os == "win") { # Flip the slashes so that copy/paste of the command works. cl = string_replace(cl, "/", "\\") + + # And to match the other -libpath flags. + _clang_lib_dir = string_replace(_clang_lib_dir, "/", "\\") } + sys_include_flags = "${win_toolchain_data.include_flags_imsvc}" - sys_lib_flags = "${win_toolchain_data.libpath_flags}" + sys_lib_flags = + "-libpath:$_clang_lib_dir ${win_toolchain_data.libpath_flags}" toolchain_args = { if (defined(invoker.toolchain_args)) { diff --git a/chromium/build/toolchain/win/midl.gni b/chromium/build/toolchain/win/midl.gni index ee7dc479e88..72e79ebaa35 100644 --- a/chromium/build/toolchain/win/midl.gni +++ b/chromium/build/toolchain/win/midl.gni @@ -123,6 +123,8 @@ template("midl") { dlldata_file, interface_identifier_file, proxy_file, + rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang-cl.exe", + root_build_dir), "{{source}}", "/char", "signed", diff --git a/chromium/build/toolchain/win/midl.py b/chromium/build/toolchain/win/midl.py index 6d6fab05a50..5483173e58c 100644 --- a/chromium/build/toolchain/win/midl.py +++ b/chromium/build/toolchain/win/midl.py @@ -173,8 +173,8 @@ def overwrite_cls_guid(h_file, iid_file, tlb_file, dynamic_guid): overwrite_cls_guid_tlb(tlb_file, dynamic_guid) -def main(arch, gendir, outdir, dynamic_guid, tlb, h, dlldata, iid, proxy, idl, - *flags): +def main(arch, gendir, outdir, dynamic_guid, tlb, h, dlldata, iid, proxy, clang, + idl, *flags): # Copy checked-in outputs to final location. source = gendir if os.path.isdir(os.path.join(source, os.path.basename(idl))): @@ -204,6 +204,10 @@ def main(arch, gendir, outdir, dynamic_guid, tlb, h, dlldata, iid, proxy, idl, env_pairs = open(arch).read()[:-2].split('\0') env_dict = dict([item.split('=', 1) for item in env_pairs]) + # Extract the /D options and send them to the preprocessor. + preprocessor_options = '-E -nologo -Wno-nonportable-include-path' + preprocessor_options += ''.join( + [' ' + flag for flag in flags if flag.startswith('/D')]) args = ['midl', '/nologo'] + list(flags) + [ '/out', tmp_dir, '/tlb', tlb, @@ -211,6 +215,8 @@ def main(arch, gendir, outdir, dynamic_guid, tlb, h, dlldata, iid, proxy, idl, '/dlldata', dlldata, '/iid', iid, '/proxy', proxy, + '/cpp_cmd', clang, + '/cpp_opt', preprocessor_options, idl] try: popen = subprocess.Popen(args, shell=True, env=env_dict, diff --git a/chromium/build/toolchain/win/setup_toolchain.py b/chromium/build/toolchain/win/setup_toolchain.py index 9c936c69d68..1a7c3d74b5c 100644 --- a/chromium/build/toolchain/win/setup_toolchain.py +++ b/chromium/build/toolchain/win/setup_toolchain.py @@ -153,10 +153,14 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): if (cpu != 'x64'): # x64 is default target CPU thus any other CPU requires a target set cpu_arg += '_' + cpu - args = [script_path, cpu_arg] + args = [script_path, cpu_arg, ] # Store target must come before any SDK version declaration if (target_store): - args.append(['store']) + args.append('store') + # Explicitly specifying the SDK version to build with to avoid accidentally + # building with a new and untested SDK. This should stay in sync with the + # packaged toolchain in build/vs_toolchain.py. + args.append('10.0.19041.0') variables = _LoadEnvFromBat(args) return _ExtractImportantEnvironment(variables) |