[clang] 8527c1e - Added constraints on cl-options.cu test

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 10:56:40 PDT 2020


On Mon, Apr 6, 2020 at 7:36 PM Artem Belevich <tra at google.com> wrote:
>
> Yup 32-bit vis 64-bit does dis trip linux tests, too some time back. We ended up passing explicit target triples to avoid host architecture leaking into the test.
>
> On a side note, shouldn't we pass -nocudalib via /clang: ?

Yes, that would be a good idea.

>
> On Mon, Apr 6, 2020 at 7:05 AM Hans Wennborg <hans at chromium.org> wrote:
>>
>> Oh no, the warning is a red herring. The problem is I'm doing a 32-bit
>> build and the triple is nvptx-nvidia-cuda, not nvptx64-nvidia-cuda.
>>
>> f8e1fc20cb3 should fix.
>>
>> On Mon, Apr 6, 2020 at 3:54 PM Hans Wennborg <hans at chromium.org> wrote:
>> >
>> > I'm seeing this failure when trying to build the Windows package for
>> > http://llvm.org/builds (yes, it's been a while). Not sure why it
>> > hasn't been on the bots (maybe the Windows bots don't build the nvptx
>> > target). Anyway, the error comes from "nocudalib" not being a valid
>> > clang-cl option. Is it supposed to be?
>> >
>> > FAIL: Clang :: Driver/cl-options.cu (5411 of 17056)
>> > ******************** TEST 'Clang :: Driver/cl-options.cu' FAILED
>> > ********************
>> > Script:
>> > --
>> > : 'RUN: at line 11';
>> > c:\src\llvm_package_64c23127\build32_stage0\bin\clang.exe
>> > --driver-mode=cl -### -nocudalib -nocudainc --
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu
>> > 2>&1 | c:\src\llvm_package_64c23127\build32_stage0\bin\filecheck.exe
>> > -check-prefix=GS-default
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu
>> > : 'RUN: at line 18';
>> > c:\src\llvm_package_64c23127\build32_stage0\bin\clang.exe
>> > --driver-mode=cl /c /GX -### -nocudalib -nocudainc --
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu
>> > 2>&1 | c:\src\llvm_package_64c23127\build32_stage0\bin\filecheck.exe
>> > -check-prefix=GX
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu
>> > : 'RUN: at line 26';
>> > c:\src\llvm_package_64c23127\build32_stage0\bin\clang.exe
>> > --driver-mode=cl /c /Gd -### -nocudalib -nocudainc --
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu
>> > 2>&1 | c:\src\llvm_package_64c23127\build32_stage0\bin\filecheck.exe
>> > -check-prefix=Gd
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu
>> > --
>> > Exit Code: 1
>> >
>> > Command Output (stdout):
>> > --
>> > $ ":" "RUN: at line 11"
>> > $ "c:\src\llvm_package_64c23127\build32_stage0\bin\clang.exe"
>> > "--driver-mode=cl" "-###" "-nocudalib" "-nocudainc" "--"
>> > "C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu"
>> > $ "c:\src\llvm_package_64c23127\build32_stage0\bin\filecheck.exe"
>> > "-check-prefix=GS-default"
>> > "C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu"
>> > # command stderr:
>> > C:\src\llvm_package_64c23127\llvm-project\clang\test\Driver\cl-options.cu:12:16:
>> > error: GS-default: expected string not found in input
>> > // GS-default: "-cc1" "-triple" "nvptx64-nvidia-cuda"
>> >                ^
>> > <stdin>:1:1: note: scanning from here
>> > clang: warning: unknown argument ignored in clang-cl: '-nocudalib'
>> > [-Wunknown-argument]
>> > ^
>> >
>> > On Thu, Mar 12, 2020 at 12:07 AM Artem Belevich via cfe-commits
>> > <cfe-commits at lists.llvm.org> wrote:
>> > >
>> > >
>> > > Author: Artem Belevich
>> > > Date: 2020-03-11T16:06:09-07:00
>> > > New Revision: 8527c1ed66c63db0590cd69320ba0bf8fad59b87
>> > >
>> > > URL: https://github.com/llvm/llvm-project/commit/8527c1ed66c63db0590cd69320ba0bf8fad59b87
>> > > DIFF: https://github.com/llvm/llvm-project/commit/8527c1ed66c63db0590cd69320ba0bf8fad59b87.diff
>> > >
>> > > LOG: Added constraints on cl-options.cu test
>> > >
>> > > Added:
>> > >
>> > >
>> > > Modified:
>> > >     clang/test/Driver/cl-options.cu
>> > >
>> > > Removed:
>> > >
>> > >
>> > >
>> > > ################################################################################
>> > > diff  --git a/clang/test/Driver/cl-options.cu b/clang/test/Driver/cl-options.cu
>> > > index 7597970af160..2fd393e06d2d 100644
>> > > --- a/clang/test/Driver/cl-options.cu
>> > > +++ b/clang/test/Driver/cl-options.cu
>> > > @@ -3,6 +3,10 @@
>> > >  // Note: %s must be preceded by --, otherwise it may be interpreted as a
>> > >  // command-line option, e.g. on Mac where %s is commonly under /Users.
>> > >
>> > > +// REQUIRES: clang-driver
>> > > +// REQUIRES: x86-registered-target
>> > > +// REQUIRES: nvptx-registered-target
>> > > +
>> > >  // -stack-protector should not be passed to device-side CUDA compilation
>> > >  // RUN: %clang_cl -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=GS-default %s
>> > >  // GS-default: "-cc1" "-triple" "nvptx64-nvidia-cuda"
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > cfe-commits mailing list
>> > > cfe-commits at lists.llvm.org
>> > > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
>
> --
> --Artem Belevich


More information about the cfe-commits mailing list