diff options
| author | Justin Lebar <jlebar@google.com> | 2016-11-18 00:41:27 +0000 |
|---|---|---|
| committer | Justin Lebar <jlebar@google.com> | 2016-11-18 00:41:27 +0000 |
| commit | f91086b0a88e672ff5a796855057fc313fd10f7d (patch) | |
| tree | b058b81d75738ddf155dc8bbc91feefdc325f2b5 /clang/test/Preprocessor | |
| parent | 66c4fd7987d216e91d219e5e8437673a7b0167f8 (diff) | |
| download | bcm5719-llvm-f91086b0a88e672ff5a796855057fc313fd10f7d.tar.gz bcm5719-llvm-f91086b0a88e672ff5a796855057fc313fd10f7d.zip | |
[CUDA] Initialize our header search using the host triple.
Summary:
This used to work because system headers are found in a (somewhat)
predictable set of locations on Linux. But this is not the case on
MacOS; without this change, we don't look in the right places for our
headers when doing device-side compilation on Mac.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26776
llvm-svn: 287286
Diffstat (limited to 'clang/test/Preprocessor')
| -rw-r--r-- | clang/test/Preprocessor/cuda-macos-includes.cu | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/cuda-macos-includes.cu b/clang/test/Preprocessor/cuda-macos-includes.cu new file mode 100644 index 00000000000..da9f393186b --- /dev/null +++ b/clang/test/Preprocessor/cuda-macos-includes.cu @@ -0,0 +1,13 @@ +// RUN: %clang -cc1 -fcuda-is-device -isysroot /var/empty \ +// RUN: -triple nvptx-nvidia-cuda -aux-triple i386-apple-macosx \ +// RUN: -S -fcuda-is-device -v -o /dev/null -x cuda %s 2>&1 | FileCheck %s + +// RUN: %clang -cc1 -isysroot /var/empty \ +// RUN: -triple i386-apple-macosx -aux-triple nvptx-nvidia-cuda \ +// RUN: -S -fcuda-is-device -v -o /dev/null -x cuda %s 2>&1 | FileCheck %s + +// Check that when we do CUDA host and device compiles on MacOS, we check for +// includes in /System/Library/Frameworks and /Library/Frameworks. + +// CHECK-DAG: ignoring nonexistent directory "/var/empty/System/Library/Frameworks" +// CHECK-DAG: ignoring nonexistent directory "/var/empty/Library/Frameworks" |

