mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
meson: fix libcl assert() reproducibility
The current -fmacro-prefix-map only handles removal of relative paths
but we still need to handle absolute paths.
The following path can be found in libvulkan_panfrost.so when building
with Yocto for example:
/work/build/tmp/work/cortexa76-cortexa55-crypto-poky-linux/mesa/25.2.0/sources/mesa-25.2.0/src/panfrost/libpan/../../util/bitpack_helpers.h
These paths currently seem to only appear in the binary in strings that
start with "Shader assertion fail at " which seems to indicate there are
calls to assert() with absolute paths as well as relative paths (which
are already patched with fmacro-prefix-map).
By stripping the project source and build root directories from the
paths with -fmacro-prefix-map, we get rid of this reproducibility issue
(which incidentally makes the build fail due to buildpaths QA issue).
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36927>
(cherry picked from commit b1a28b1165)
This commit is contained in:
parent
e1ddd68a84
commit
3445cb5577
2 changed files with 3 additions and 1 deletions
|
|
@ -4164,7 +4164,7 @@
|
|||
"description": "meson: fix libcl assert() reproducibility",
|
||||
"nominated": false,
|
||||
"nomination_type": 0,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ relative_dir = fs.relative_to(meson.project_source_root(), meson.project_build_r
|
|||
|
||||
cl_args = [
|
||||
'-fmacro-prefix-map=@0@/='.format(relative_dir),
|
||||
'-fmacro-prefix-map=@0@/='.format(meson.project_source_root()),
|
||||
'-fmacro-prefix-map=@0@/='.format(meson.project_build_root()),
|
||||
|
||||
# Set the OpenCL standard to CL 2.0, enabling everything at a frontend.
|
||||
# Drivers may not actually support everything but that's ok.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue