From bb056174146ae01448e0281ea204d2ddd60ebe3c Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Tue, 16 Jul 2019 13:04:27 -0400 Subject: Use -fmacro-prefix-map to strip build path This commit matches sway's 2dc4978d8af326c310057ca8fd22a4c7f5d09335. To help ensure a reproducible build (when debug info is disabled), the meson build script now uses the -fmacro-prefix-map command line argument supported by GCC to strip the build-path dependent bytes of each __FILE__ string used by wlr_log and related functions. A rather ugly algorithm is used to compute the relative path between the build and source folders, because meson has no specific function for this. When the compiler does not support -fmacro-prefix-map, fall back to shifting the start of each __FILE__ string by the length of the relative path to the source directory. --- include/render/gles2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/render') diff --git a/include/render/gles2.h b/include/render/gles2.h index 7e0782d4..15653cac 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -98,7 +98,7 @@ struct wlr_gles2_texture *gles2_get_texture( void push_gles2_marker(const char *file, const char *func); void pop_gles2_marker(void); -#define PUSH_GLES2_DEBUG push_gles2_marker(_wlr_strip_path(__FILE__), __func__) +#define PUSH_GLES2_DEBUG push_gles2_marker(_WLR_FILENAME, __func__) #define POP_GLES2_DEBUG pop_gles2_marker() #endif -- cgit v1.2.3