This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Frontend access to target-related options

On Thu, Jan 2, 2020 at 5:54 PM Nathan Sidwell <> wrote:
> On 1/1/20 4:31 AM, The Other wrote:
> > Hi,
> > I'm currently working on a Rust frontend for GCC. Rust has some
> > language-level conditional compilation features based on the presence or
> > lack of features in the target architecture (e.g. SSE, AVX, a static C
> > runtime) as well as the target CPU architecture itself, target OS, and
> > various other target-related information (such as pointer width and
> > endianness).
> >
> > As such, the frontend parser requires this target-related option
> > information to be available to it. I was wondering if there was an
> > architecture-neutral way of accessing this data (if it is even stored).
> > I've looked into options.h but I cannot figure out how to use it in an
> > architecture-neutral way.
> Um, AVX and such are arch-specific.  It sounds like you need some kind
> of (new?) langhook that targets can register?

You mean target hook.  Depending on the actual piece of info such hook
might already exist though.


> nathan
> --
> Nathan Sidwell

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]