diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-06-27 14:24:54 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-07-09 13:27:15 +1000 |
commit | 00fdbe3951d7717b03c46b31d1712c45fe492cf1 (patch) | |
tree | 50a4e8c2a2d92d25d7fd500a4d41e9c13a5d39d6 /tools/shared.c | |
parent | 6be9c3c84e861332938e50d04e82e235a5e2765f (diff) | |
download | libinput-00fdbe3951d7717b03c46b31d1712c45fe492cf1.tar.gz |
tools: don't add the debug behavior for release builds
When the meson build type is something other than the debug types, we don't
need the special behavior where we adjust executable paths and data dir
lookup for tools run directly from the builddir.
This avoids leaking the build dir into the final executables.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools/shared.c')
-rw-r--r-- | tools/shared.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/shared.c b/tools/shared.c index 74c0cdad..3cda4573 100644 --- a/tools/shared.c +++ b/tools/shared.c @@ -477,6 +477,11 @@ tools_execdir_is_builddir(void) char *pathsep; ssize_t sz; + /* In the case of release builds, the builddir is + the empty string */ + if (streq(MESON_BUILD_ROOT, "")) + return NULL; + sz = readlink("/proc/self/exe", execdir, sizeof(execdir) - 1); if (sz <= 0 || sz == sizeof(execdir) - 1) return NULL; |