On Thursday, 28 February 2019 at 10:37:22 UTC, Nicholas Wilson
wrote:
On Thursday, 28 February 2019 at 09:58:35 UTC, Michelle Long
wrote:
I've included it in Visual D as di and it seems not to add it
to the include line...
Is it in any way possible that it being an di file would allow
that? Seems that it is an LDC issue though but LDC has some
usage of it I believe and it works fine.
Could it be a LDC version? Or do I need to include something
to make it work? Seems like it would be part of the compiler
itself.
(I'm on cold and flu meds so apologies if this doesn't make
sense)
It should be on the atuoimport path of LDC as that file had
others
(https://github.com/ldc-developers/druntime/tree/ldc/src/ldc)
are part of LDC's druntime which should be imported by ldc's
.conf file, it won't show up on the command line unless you do
something (... brain not working properly...).
Irrespective of all that, the error comes from
https://github.com/ldc-developers/ldc/blob/f5a5324773484447953746725ea455d2827e6004/dmd/dsymbolsem.d#L1862
which should never happen because this branch should be taken
https://github.com/ldc-developers/ldc/blob/f5a5324773484447953746725ea455d2827e6004/dmd/dsymbolsem.d#L1807
because that pragma is explicitly checked for here
https://github.com/ldc-developers/ldc/blob/187d8198e63564c633f22f2ef4db2a31a8a600ce/gen/pragma.cpp#L110
Yeah, in the config it is
// default switches appended after all explicit command-line
switches
post-switches = [
"-I%%ldcbinarypath%%/../import",
I've hard coded it and it still doesn't find them.
I've added -conf=
and nothing...
dcompute\driver\cuda\package.d(3): Error: module `dcompute` is in
file 'ldc\dcompute.d' which cannot be read
Of course if I manually include it then it gives more problems...
Seems ldc is not even reading the conf file or using it if it is?
If you are right then it seems you are suggesting it is an LDC
bug... but that this is highly unlikely...
I am using Visual D and maybe it is all setup for dub and dub
takes care of configuring something that Visual D does not?
Note that I've had to include the dcompute imports(downloaded
from git), rt(for xmalloc I think), and derelict modules.
I did those because when I added dcompute it would complain about
the missing modules so I had to hunt and peck to find them.
When I remove the ldc imports from Visual D,
then the error about missing ldc.dcompute is at
module dcompute.driver.cuda;
public import ldc.dcompute;
which, is in the ldc imports dir(which is why i manually included
them which solves it then gives the intrinsics error).
In any case, it seems like it is a very strange bug since
`pragma(LDC_intrinsic` should work fine. It's analogous to
`pragma(msg` not working in dmd...
Are you using the latest ldc? (1.14.0?)