[Mesa-dev] [PATCH 3/4] anv: Use central api generation scripts.
Dylan Baker
dylan at pnwbakers.com
Thu Aug 9 23:57:17 UTC 2018
Quoting Chad Versace (2018-08-09 10:37:33)
> On Tue 07 Aug 2018, Dylan Baker wrote:
> > Quoting Bas Nieuwenhuizen (2018-08-07 16:14:33)
> > >
> > > anv_extensions_c = custom_target(
> > > @@ -36,10 +37,11 @@ anv_extensions_c = custom_target(
> > > input : ['anv_extensions_gen.py', vk_api_xml],
> > > output : 'anv_extensions.c',
> > > command : [
> > > + 'env', 'PYTHONPATH=@0@'.format(join_paths(meson.source_root(), 'src/vulkan/util/')),
> >
> > This is really gross, you're adding a dependency on a unix console command. I
> > know that anv is only built on Unix-like oses, but this will eventually end up
> > being used in some code that needs to run on Windows (or mac, does mac have
> > env?).
> >
> > I know that some people will object, but IMHO a better solution than mucking
> > with the python path (either through sys.path or through PYTHONPATH, is to
> > put all of the generators in a src/generators directory and be done with it.
> > Sure the intel specific bits (for example) aren't in the src/intel folder,
> > that's a small price to avoid having to call env just to run a python script.
>
> Dylan, I think we should avoid introducing complexity in the build
> system for the benefit of operating systems not supported by the driver.
> That feels like a serious premature optimazation, to me. Anvil's usage
> of ioctls is highly specific to Linux/Unix, will not work on MacOS, and
> definitely does not work on Windows.
I agree completely. I think where we disagree is on whether mucking with
PYTHONPATH and using env is more complex or putting our generators in a single
directory is more complex. I think using env is extremely gross and complex, I
think mucking with PYTHONPATH is extremely gross and complex, and I think having
to reference a file from another directory is a *lot* less gross and *much* less
complex.
>
> (By the way, MacOS has the 'env' command).
Good to know.
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180809/55f7db5b/attachment.sig>
More information about the mesa-dev
mailing list