mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 22:11:04 +01:00
meson: order GPU compilation after shader header generation (#6590)
The shader header custom targets are built by default, but their outputs
are not included in the sources of libharfbuzz-gpu. This allows Ninja to
compile the GPU sources concurrently with shader header generation.
The generator also copies each generated header into the source directory.
The GPU sources use quoted includes, which find these source-tree copies
first. Since the copy truncates its destination before writing, a compiler
running concurrently can read an empty header and report undeclared shader
symbols.
Collect the shader header targets and add them to the GPU library sources.
Meson then orders compilation after those targets have completed, including
their copies back into the source tree.
Keep the existing build-by-default behavior unchanged.
Fixes: b1ad797e5 ("[gpu] Commit stringized shader headers; auto-regenerate like ragel")
Assisted-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
This commit is contained in:
1 parent
2f489784c8
commit
09aff9962a
1 file changed
+3
-1
+3
-1
@@ -852,8 +852,9 @@ hb_gpu_shader_sources = [
|
||||
]
|
||||
|
||||
hb_gpu_shader_helper = find_program('gen-gpu-shader-artifacts.py')
|
||||
hb_gpu_shader_headers = []
|
||||
foreach p: hb_gpu_shader_sources
|
||||
custom_target('@0@'.format(p.get(1)),
|
||||
hb_gpu_shader_headers += custom_target('@0@'.format(p.get(1)),
|
||||
build_by_default: true,
|
||||
input: p.get(0),
|
||||
output: p.get(1),
|
||||
@@ -878,6 +879,7 @@ if not get_option('gpu').disabled()
|
||||
|
||||
libharfbuzz_gpu = library('harfbuzz-gpu',
|
||||
hb_gpu_sources,
|
||||
hb_gpu_shader_headers,
|
||||
include_directories: incconfig,
|
||||
dependencies: gpu_deps,
|
||||
link_with: [libharfbuzz],
|
||||
|
||||
Reference in new issue
Block a user