diff options
| author | Justin Lebar <jlebar@google.com> | 2016-01-25 22:36:35 +0000 |
|---|---|---|
| committer | Justin Lebar <jlebar@google.com> | 2016-01-25 22:36:35 +0000 |
| commit | 710a35f1c7c9cdbc532fe63fc145e747049505f2 (patch) | |
| tree | 1c2842c0e184285eda68744da03dd740c486df77 /clang/lib | |
| parent | 3aa113321b7078260cfb6f65dfdd0d990de29630 (diff) | |
| download | bcm5719-llvm-710a35f1c7c9cdbc532fe63fc145e747049505f2.tar.gz bcm5719-llvm-710a35f1c7c9cdbc532fe63fc145e747049505f2.zip | |
[CUDA] Disable ctor/dtor aliases in device code.
Summary: NVPTX doesn't support aliases, so don't generate them.
Reviewers: tra
Subscribers: cfe-commits, jhen, echristo
Differential Revision: http://reviews.llvm.org/D16499
llvm-svn: 258733
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 814eb353c5c..6172baac43a 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3985,9 +3985,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("Arguments"); } - // Enable -mconstructor-aliases except on darwin, where we have to - // work around a linker bug; see <rdar://problem/7651567>. - if (!getToolChain().getTriple().isOSDarwin()) + // Enable -mconstructor-aliases except on darwin, where we have to work around + // a linker bug (see <rdar://problem/7651567>), and CUDA device code, where + // aliases aren't supported. + if (!getToolChain().getTriple().isOSDarwin() && + !getToolChain().getTriple().isNVPTX()) CmdArgs.push_back("-mconstructor-aliases"); // Darwin's kernel doesn't support guard variables; just die if we |

