Reland "[build] Share windows runtime dlls with src/build"

This is a reland of 59a5682589

Original change's description:
> [V8] Share windows runtime dlls with src/build
>
> Bug: chromium:653569
> Change-Id: I2fa288d3281c75d3e5d483fb94d29efe454c633b
> Reviewed-on: https://chromium-review.googlesource.com/1000773
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52464}

TBR=jgruber@chromium.org

Bug: chromium:653569
Change-Id: I74f67b25205c6505fc90e41c059fbb6f4e20c078
Reviewed-on: https://chromium-review.googlesource.com/1004454
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52500}
This commit is contained in:
Michael Achenbach 2018-04-09 08:36:36 +02:00 committed by Commit Bot
parent 73c10e77d1
commit c1c40d3982

View File

@ -4,7 +4,6 @@
import("//build/config/android/config.gni")
import("//build/config/arm.gni")
import("//build/config/clang/clang.gni")
import("//build/config/dcheck_always_on.gni")
import("//build/config/host_byteorder.gni")
import("//build/config/jumbo.gni")
@ -2701,6 +2700,8 @@ v8_component("v8_libbase") {
data = []
data_deps = []
defines = []
if (is_component_build) {
@ -2790,76 +2791,7 @@ v8_component("v8_libbase") {
"ws2_32.lib",
]
if (is_component_build) {
# TODO(machenbach): Move the original out of src/base in order to depend
# on it.
# Copy the VS runtime DLLs into the isolate so that they don't have to be
# preinstalled on the target machine. The debug runtimes have a "d" at
# the end.
if (v8_enable_debugging_features) {
vcrt_suffix = "d"
} else {
vcrt_suffix = ""
}
# These runtime files are copied to the output directory by the
# vs_toolchain script that runs as part of toolchain configuration.
data += [
"$root_out_dir/msvcp140${vcrt_suffix}.dll",
"$root_out_dir/vccorlib140${vcrt_suffix}.dll",
"$root_out_dir/vcruntime140${vcrt_suffix}.dll",
# Universal Windows 10 CRT files
"$root_out_dir/api-ms-win-core-console-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-datetime-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-debug-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-errorhandling-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-file-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-file-l1-2-0.dll",
"$root_out_dir/api-ms-win-core-file-l2-1-0.dll",
"$root_out_dir/api-ms-win-core-handle-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-heap-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-interlocked-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-libraryloader-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-localization-l1-2-0.dll",
"$root_out_dir/api-ms-win-core-memory-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-namedpipe-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-processenvironment-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-processthreads-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-processthreads-l1-1-1.dll",
"$root_out_dir/api-ms-win-core-profile-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-rtlsupport-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-string-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-synch-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-synch-l1-2-0.dll",
"$root_out_dir/api-ms-win-core-sysinfo-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-timezone-l1-1-0.dll",
"$root_out_dir/api-ms-win-core-util-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-conio-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-convert-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-environment-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-filesystem-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-heap-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-locale-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-math-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-multibyte-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-private-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-process-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-runtime-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-stdio-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-string-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-time-l1-1-0.dll",
"$root_out_dir/api-ms-win-crt-utility-l1-1-0.dll",
"$root_out_dir/ucrtbase${vcrt_suffix}.dll",
]
if (is_asan) {
if (current_cpu == "x64") {
data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-x86_64.dll" ]
} else {
data += [ "$clang_base_path/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-i386.dll" ]
}
}
}
data_deps += [ "//build/win:runtime_libs" ]
}
if (is_tsan && !build_with_chromium) {