[Openmp-commits] [PATCH] D70328: [libomptarget][nfc] Move some source into common from nvptx
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Nov 15 13:04:12 PST 2019
JonChesterfield added a comment.
In D70328#1748208 <https://reviews.llvm.org/D70328#1748208>, @ABataev wrote:
> Nope, still the same. I think the reason is `-x cu` option in nvcc invocation command, obj file is treated as cuda source file with this option
Yep, good spot. -x cu is right for compiling the source but not for linking.
There's an alternative '-Xcompiler -x -Xcompiler cu', or '--compiler-options -x --compiler-options cu', but that also passes the arguments to gcc which errors with 'language not recognised'
Which I think means -x cu is not usable via cmake. How do you feel about shims like:
nvptx/loop.cu:
#include "common/src/loop.cpp"
Testing that approach now
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70328/new/
https://reviews.llvm.org/D70328
More information about the Openmp-commits
mailing list