Mesa (master): util: Move stack debug functions to src/util
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 5 18:25:46 UTC 2020
Module: Mesa
Branch: master
Commit: 848e7b947d0d505d54d27780b052e5532c721678
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=848e7b947d0d505d54d27780b052e5532c721678
Author: Kristian H. Kristensen <hoegsberg at google.com>
Date: Tue Jul 28 22:02:31 2020 -0700
util: Move stack debug functions to src/util
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
---
meson.build | 4 +---
src/gallium/auxiliary/meson.build | 15 +--------------
src/util/meson.build | 11 ++++++++++-
src/{gallium/auxiliary => }/util/u_debug_stack.c | 0
src/{gallium/auxiliary => }/util/u_debug_stack.h | 0
.../auxiliary => }/util/u_debug_stack_android.cpp | 0
src/{gallium/auxiliary => }/util/u_debug_symbol.c | 0
src/{gallium/auxiliary => }/util/u_debug_symbol.h | 0
8 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/meson.build b/meson.build
index 4b57cf326ec..2dabd8188e2 100644
--- a/meson.build
+++ b/meson.build
@@ -841,10 +841,8 @@ if with_platform_android
dependency('cutils'),
dependency('hardware'),
dependency('sync'),
+ dependency('backtrace')
]
- if with_gallium
- dep_android += dependency('backtrace')
- endif
if get_option('platform-sdk-version') >= 26
dep_android += dependency('nativewindow')
endif
diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build
index 76dd0e1f4a5..a1a1b5b64e6 100644
--- a/src/gallium/auxiliary/meson.build
+++ b/src/gallium/auxiliary/meson.build
@@ -249,9 +249,6 @@ files_libgallium = files(
'util/u_debug_image.h',
'util/u_debug_refcnt.c',
'util/u_debug_refcnt.h',
- 'util/u_debug_stack.h',
- 'util/u_debug_symbol.c',
- 'util/u_debug_symbol.h',
'util/u_dirty_flags.h',
'util/u_dirty_surfaces.h',
'util/u_dl.c',
@@ -341,16 +338,6 @@ files_libgallium = files(
'nir/nir_draw_helpers.h',
)
-if with_platform_android
- files_libgallium += files(
- 'util/u_debug_stack_android.cpp',
- )
-else
- files_libgallium += files(
- 'util/u_debug_stack.c',
- )
-endif
-
if dep_libdrm.found()
files_libgallium += files(
'renderonly/renderonly.c',
@@ -522,7 +509,7 @@ libgallium = static_library(
cpp_args : [cpp_msvc_compat_args],
gnu_symbol_visibility : 'hidden',
dependencies : [
- dep_libdrm, dep_llvm, dep_unwind, dep_dl, dep_m, dep_thread, dep_lmsensors,
+ dep_libdrm, dep_llvm, dep_dl, dep_m, dep_thread, dep_lmsensors,
idep_nir, idep_nir_headers, idep_mesautil,
],
build_by_default : false
diff --git a/src/util/meson.build b/src/util/meson.build
index 25c363ab95c..909b3e07468 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -158,15 +158,24 @@ deps_for_libmesa_util = [
dep_m,
dep_valgrind,
dep_zstd,
+ dep_dl,
+ dep_unwind,
]
if with_platform_android
deps_for_libmesa_util += dep_android
+ files_debug_stack = files('u_debug_stack_android.cpp')
+ else
+ files_debug_stack = files(
+ 'u_debug_stack.c',
+ 'u_debug_symbol.c',
+ 'u_debug_symbol.h',
+ )
endif
_libmesa_util = static_library(
'mesa_util',
- [files_mesa_util, format_srgb],
+ [files_mesa_util, files_debug_stack, format_srgb],
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : deps_for_libmesa_util,
link_with: libmesa_format,
diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/util/u_debug_stack.c
similarity index 100%
rename from src/gallium/auxiliary/util/u_debug_stack.c
rename to src/util/u_debug_stack.c
diff --git a/src/gallium/auxiliary/util/u_debug_stack.h b/src/util/u_debug_stack.h
similarity index 100%
rename from src/gallium/auxiliary/util/u_debug_stack.h
rename to src/util/u_debug_stack.h
diff --git a/src/gallium/auxiliary/util/u_debug_stack_android.cpp b/src/util/u_debug_stack_android.cpp
similarity index 100%
rename from src/gallium/auxiliary/util/u_debug_stack_android.cpp
rename to src/util/u_debug_stack_android.cpp
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/util/u_debug_symbol.c
similarity index 100%
rename from src/gallium/auxiliary/util/u_debug_symbol.c
rename to src/util/u_debug_symbol.c
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.h b/src/util/u_debug_symbol.h
similarity index 100%
rename from src/gallium/auxiliary/util/u_debug_symbol.h
rename to src/util/u_debug_symbol.h
More information about the mesa-commit
mailing list