[Libclc-dev] libclc + llvm: enabling extensions
awatry at gmail.com
Mon Jan 19 11:46:16 PST 2015
On Jan 19, 2015 8:43 AM, "Tom Stellard" <tom at stellard.net> wrote:
> On Thu, Jan 15, 2015 at 09:42:30AM -0500, Richard Gorton wrote:
> > Hi,
> > I'm working with libclc/llvm, and encountered a compilation error on
> > #ifndef cl_clang_storage_class_specifiers
> > #error Implementation requires cl_clang_storage_class_specifiers
> > #endif
> > 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?
> There is no convention for this, but what I would suggest is to wrap any
> #if feature_x
> And then have either you OpenCL implementation or the target defintion in
> clang enable them by defining feature_x.
> This won't work for all extensions, though. If you want to enable an
> that adds a new type, you will need to make modifications to clang.
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.
I had hoped to figure that out for clover a while ago, but babies eat up
all available energy/free time.
> > Regards,
> > Richard Gorton
> > rcgorton at cog-e.com
> > _______________________________________________
> > Libclc-dev mailing list
> > Libclc-dev at pcc.me.uk
> > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
> Libclc-dev mailing list
> Libclc-dev at pcc.me.uk
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libclc-dev