aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp/CROSSTOOL.tpl
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-04-05 13:52:28 +0000
committerGravatar Marcel Hlopko <hlopko@google.com>2017-04-06 10:59:13 +0200
commit6a0ddd88ef41b1b38256a36544c4f55b40bda9f3 (patch)
treee2f4743e73d8cca19022ac9c293fa38881588b87 /tools/cpp/CROSSTOOL.tpl
parent32de87e07fe4f5e6379c1f6d29be0f6fd23b5768 (diff)
Windows MSVC toolchain: Move environment variables setup from wrapper script to CROSSTOOL
Change-Id: Ic6ee5a22412281743267a40623f4a8514a2e70f6 PiperOrigin-RevId: 152252048
Diffstat (limited to 'tools/cpp/CROSSTOOL.tpl')
-rw-r--r--tools/cpp/CROSSTOOL.tpl44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/cpp/CROSSTOOL.tpl b/tools/cpp/CROSSTOOL.tpl
index a2bf86b7a1..60fb955e95 100644
--- a/tools/cpp/CROSSTOOL.tpl
+++ b/tools/cpp/CROSSTOOL.tpl
@@ -222,6 +222,41 @@ toolchain {
linker_flag: "-m64"
feature {
+ name: "msvc_env"
+ env_set {
+ action: "c-compile"
+ action: "c++-compile"
+ action: "c++-module-compile"
+ action: "c++-header-parsing"
+ action: "c++-header-preprocessing"
+ action: "assemble"
+ action: "preprocess-assemble"
+ action: "c++-link-executable"
+ action: "c++-link-dynamic-library"
+ action: "c++-link-static-library"
+ action: "c++-link-alwayslink-static-library"
+ action: "c++-link-pic-static-library"
+ action: "c++-link-alwayslink-pic-static-library"
+ env_entry {
+ key: "PATH"
+ value: "%{msvc_env_path}"
+ }
+ env_entry {
+ key: "INCLUDE"
+ value: "%{msvc_env_include}"
+ }
+ env_entry {
+ key: "LIB"
+ value: "%{msvc_env_lib}"
+ }
+ env_entry {
+ key: "TMP"
+ value: "%{msvc_env_tmp}"
+ }
+ }
+ }
+
+ feature {
name: 'include_paths'
flag_set {
action: 'preprocess-assemble'
@@ -301,6 +336,7 @@ toolchain {
flag: '/Fi%{output_preprocess_file}'
}
}
+ implies: 'msvc_env'
}
action_config {
@@ -334,6 +370,7 @@ toolchain {
flag: '/Fi%{output_preprocess_file}'
}
}
+ implies: 'msvc_env'
}
action_config {
@@ -348,6 +385,7 @@ toolchain {
implies: 'input_param_flags'
implies: 'legacy_link_flags'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
action_config {
@@ -364,6 +402,7 @@ toolchain {
implies: 'has_configured_linker_path'
implies: 'legacy_link_flags'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
action_config {
@@ -374,6 +413,7 @@ toolchain {
}
implies: 'input_param_flags'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
action_config {
@@ -384,6 +424,7 @@ toolchain {
}
implies: 'input_param_flags'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
# TODO(pcloudy): The following action_config is listed in MANDATORY_LINK_TARGET_TYPES.
@@ -396,6 +437,7 @@ toolchain {
}
implies: 'input_param_flags'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
action_config {
@@ -406,6 +448,7 @@ toolchain {
}
implies: 'input_param_flags'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
action_config {
@@ -416,6 +459,7 @@ toolchain {
}
implies: 'strip_debug_symbols'
implies: 'linker_param_file'
+ implies: 'msvc_env'
}
feature {