• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl b/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl
2index 282ba08cda..93713a66dd 100644
3--- a/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl
4+++ b/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl
5@@ -1311,7 +1311,7 @@ def _impl(ctx):
6             fastbuild_feature,
7             dbg_feature,
8             supports_dynamic_linker_feature,
9-            supports_pic_feature,
10+            supports_pic_feature, feature(name='hack', enabled=True, flag_sets = [ flag_set(actions = [ ACTION_NAMES.assemble, ACTION_NAMES.preprocess_assemble, ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, ACTION_NAMES.cpp_header_parsing, ACTION_NAMES.cpp_module_compile, ACTION_NAMES.cpp_module_codegen, ACTION_NAMES.cpp_link_executable, ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, ], flag_groups = [ flag_group( flags = ["--sysroot=/dt7"] ) ]) ]),
11         ]
12     elif (ctx.attr.cpu == "darwin"):
13         features = [
14diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
15index cf63adcbaa..c0718a9762 100644
16--- a/third_party/gpus/cuda_configure.bzl
17+++ b/third_party/gpus/cuda_configure.bzl
18@@ -282,7 +282,7 @@ def _get_cxx_inc_directories_impl(repository_ctx, cc, lang_is_cpp):
19         lang = "c++"
20     else:
21         lang = "c"
22-    result = repository_ctx.execute([cc, "-E", "-x" + lang, "-", "-v"])
23+    result = repository_ctx.execute([cc, "-E", "-x" + lang, "-", "-v", "--sysroot=/dt7", "-no-canonical-prefixes"])
24     index1 = result.stderr.find(_INC_DIR_MARKER_BEGIN)
25     if index1 == -1:
26         return []
27