aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc
diff options
context:
space:
mode:
authorGravatar Martin Wicke <wicke@google.com>2016-07-25 13:48:16 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-07-25 15:02:34 -0700
commit21716d8f6e175cd6e8cd97a84e48497574268b0c (patch)
tree3345202e7a812cc9572beb24fc01732696a4140d /third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc
parented281973d66d0030e58a77a05821bbb88627f5bd (diff)
Merge changes from github.
Change: 128401884
Diffstat (limited to 'third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc')
-rwxr-xr-xthird_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc31
1 files changed, 5 insertions, 26 deletions
diff --git a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc
index 071997ca44..389444e731 100755
--- a/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc
+++ b/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc
@@ -100,36 +100,15 @@ def GetHostCompilerOptions(argv):
args, _ = parser.parse_known_args(argv)
opts = ''
- # This is a temporary workaround for b/12960069.
- # NVIDIA is going to fix this in CUDA 6.5, but until then this workaround
- # will let us compile Thrust with the cuda crosstool.
- # bazel passes all include directories as '-isystem dir' to the crosstool.
- # This causes nvcc to think that there are kernel launches from system
- # directories (which apparently is not supported by the compiler). This
- # workaround changes '-isystem third_party/gpus/cuda/include' to
- # '-iquote third_party/gpus/cuda/include'.
- isystem_args = [x for x in args.isystem
- if 'third_party/gpus/cuda/include' not in x]
- iquote_args = (args.iquote +
- [x for x in args.isystem
- if 'third_party/gpus/cuda/include' in x])
- # This hack is needed so that we can compile eigen3. We need to include
- # third_party/eigen3 with -I. Some eigen file include using the
- # include <Eigen/Core> syntax, and -iquote doesn't work for that.
- has_eigen = ['third_party/eigen3'] in isystem_args
- if has_eigen:
- isystem_args.remove(['third_party/eigen3'])
-
- if isystem_args:
- opts += '-isystem ' + ' -isystem '.join(sum(isystem_args, []))
- if iquote_args:
- opts += ' -iquote ' + ' -iquote '.join(sum(iquote_args, []))
+
+ if args.isystem:
+ opts += ' -isystem ' + ' -isystem '.join(sum(args.isystem, []))
+ if args.iquote:
+ opts += ' -iquote ' + ' -iquote '.join(sum(args.iquote, []))
if args.g:
opts += ' -g' + ' -g'.join(sum(args.g, []))
if args.sysroot:
opts += ' --sysroot ' + args.sysroot[0]
- if has_eigen:
- opts += ' -I third_party/eigen3'
return opts