2018-08-25 07:30:58 -04:00
|
|
|
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
|
|
|
|
|
|
|
import("//build/toolchain/cc_wrapper.gni")
|
|
|
|
|
2018-09-07 14:19:44 -04:00
|
|
|
# Verify that the cc_wrapper/toolchain combo correctly set up on Windows.
|
|
|
|
if (is_win && cc_wrapper != "") {
|
|
|
|
cc_wrapper_toolchain = "//build_extra/toolchain/win:win_clang_$target_cpu"
|
|
|
|
toolchain_supports_cc_wrapper = cc_wrapper_toolchain == default_toolchain &&
|
|
|
|
cc_wrapper_toolchain == host_toolchain
|
2018-08-25 07:30:58 -04:00
|
|
|
|
2018-09-07 14:19:44 -04:00
|
|
|
if (!toolchain_supports_cc_wrapper) {
|
|
|
|
# Using print instead of assert-with-message for readability of the output.
|
|
|
|
print("The 'cc_wrapper' option isn't supported by the default Windows" +
|
|
|
|
" toolchain. To make it work, add these gn arguments:")
|
|
|
|
print(" custom_toolchain=\"$cc_wrapper_toolchain\"")
|
|
|
|
print(" host_toolchain=\"$cc_wrapper_toolchain\"")
|
|
|
|
assert(toolchain_supports_cc_wrapper)
|
|
|
|
}
|
2018-08-25 07:30:58 -04:00
|
|
|
}
|