aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp/CROSSTOOL.tpl
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-04-25 14:21:41 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-04-25 14:48:20 +0200
commit29d5e9c533e74970ca0fa9d1adbe9cc5cbe02cf2 (patch)
tree2d836096fbf02bbd8b948299705df8f76b63aa63 /tools/cpp/CROSSTOOL.tpl
parent3b5f9bd49d4e891aa3ca07e30a28158f1184c3db (diff)
Parse /showIncludes output for MSVC compiler
Instead of parsing .d file generated by wrapper script, we directly parse the output of /showIncludes option. Change-Id: Id94e20a5cb05a494a793fd6a43756d44d27cea8a PiperOrigin-RevId: 154161939
Diffstat (limited to 'tools/cpp/CROSSTOOL.tpl')
-rw-r--r--tools/cpp/CROSSTOOL.tpl13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/cpp/CROSSTOOL.tpl b/tools/cpp/CROSSTOOL.tpl
index 2d394c62f1..353e86fa82 100644
--- a/tools/cpp/CROSSTOOL.tpl
+++ b/tools/cpp/CROSSTOOL.tpl
@@ -300,8 +300,15 @@ toolchain {
}
}
+ # Stop adding any flag for dotD file, Bazel knows how to parse the output of /showIncludes option
+ # TODO(bazel-team): Remove this empty feature. https://github.com/bazelbuild/bazel/issues/2868
feature {
name: 'dependency_file'
+ }
+
+ # Tell Bazel to parse the output of /showIncludes
+ feature {
+ name: 'parse_showincludes'
flag_set {
action: 'assemble'
action: 'preprocess-assemble'
@@ -310,10 +317,8 @@ toolchain {
action: 'c++-module-compile'
action: 'c++-header-preprocessing'
action: 'c++-header-parsing'
- expand_if_all_available: 'dependency_file'
flag_group {
- flag: '/DEPENDENCY_FILE'
- flag: '%{dependency_file}'
+ flag: "/showIncludes"
}
}
}
@@ -361,6 +366,7 @@ toolchain {
}
implies: 'nologo'
implies: 'msvc_env'
+ implies: 'parse_showincludes'
}
action_config {
@@ -396,6 +402,7 @@ toolchain {
}
implies: 'nologo'
implies: 'msvc_env'
+ implies: 'parse_showincludes'
}
action_config {