<p dir="ltr"><br>
On Jan 19, 2015 8:43 AM, "Tom Stellard" <<a href="mailto:tom@stellard.net">tom@stellard.net</a>> wrote:<br>
><br>
> On Thu, Jan 15, 2015 at 09:42:30AM -0500, Richard Gorton wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > I'm working with libclc/llvm, and encountered a compilation error on generic/include/clc/clc.h<br>
> ><br>
> > #ifndef cl_clang_storage_class_specifiers<br>
> > #error Implementation requires cl_clang_storage_class_specifiers extension!<br>
> > #endif<br>
> ><br>
> > Quite reasonable; as I'm investigating what goes on in LLVM3.5 I do not see any apparent instances where the various features are turned on for a given target.  What (if any) is the 'normal' convention used to turn the various extensions on or off for a given target?<br>
> ><br>
><br>
> There is no convention for this, but what I would suggest is to wrap any extended features<br>
> in:<br>
><br>
> #if feature_x<br>
> ...<br>
> #endif<br>
><br>
> And then have either you OpenCL implementation or the target defintion in<br>
> clang enable them by defining feature_x.<br>
><br>
> This won't work for all extensions, though.  If you want to enable an extension<br>
> that adds a new type, you will need to make modifications to clang.<br>
><br>
> -Tom</p>
<p dir="ltr">Note that in the case of storage class specifiers, I'm not sure that defining the feature is enough.  I tried doing that in clover a while back and that wasn't enough to enable usage of the static keyword for functions in clc source.</p>
<p dir="ltr">I had hoped to figure that out for clover a while ago, but babies eat up all available energy/free time.</p>
<p dir="ltr">--Aaron</p>
<p dir="ltr">><br>
> > Regards,<br>
> ><br>
> >       Richard Gorton<br>
> >       <a href="mailto:rcgorton@cog-e.com">rcgorton@cog-e.com</a><br>
> > _______________________________________________<br>
> > Libclc-dev mailing list<br>
> > <a href="mailto:Libclc-dev@pcc.me.uk">Libclc-dev@pcc.me.uk</a><br>
> > <a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev">http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev</a><br>
><br>
> _______________________________________________<br>
> Libclc-dev mailing list<br>
> <a href="mailto:Libclc-dev@pcc.me.uk">Libclc-dev@pcc.me.uk</a><br>
> <a href="http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev">http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev</a><br>
</p>