As written this would require that the driver be built before we looked
at the option. This is wrong because it affects code outside of the
driver, it's in libGL's PCI ID table. This is sort of harmless for
crocus at the moment, but for iris you would need to build it in order
to remove it from the table; if you built just i965 and tried to run it
against gen9, the libGL you just built would direct the loader to the
iris driver you just didn't, and setup would fail, which is: goofy.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11655>
'-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
]
-if with_gallium_iris and get_option('prefer-iris')
+if get_option('prefer-iris')
loader_c_args += ['-DPREFER_IRIS']
endif
-if with_gallium_crocus and get_option('prefer-crocus')
+if get_option('prefer-crocus')
loader_c_args += ['-DPREFER_CROCUS']
endif