build: remove DISTRIBUTOR_DEBUGINFO_AVAILABLE
This commit is contained in:
parent
cdde4c63f4
commit
a849a88893
6 changed files with 14 additions and 19 deletions
10
BUILD.md
10
BUILD.md
|
|
@ -15,15 +15,7 @@ Please make this descriptive enough to identify your specific package, for examp
|
|||
- `Nixpkgs`
|
||||
- `Fedora COPR (errornointernet/quickshell)`
|
||||
|
||||
`-DDISTRIBUTOR_DEBUGINFO_AVAILABLE=YES/NO`
|
||||
|
||||
If we can retrieve binaries and debug information for the package without actually running your
|
||||
distribution (e.g. from an website), and you would like to strip the binary, please set this to `YES`.
|
||||
|
||||
If we cannot retrieve debug information, please set this to `NO` and
|
||||
**ensure you aren't distributing stripped (non debuggable) binaries**.
|
||||
|
||||
In both cases you should build with `-DCMAKE_BUILD_TYPE=RelWithDebInfo` (then split or keep the debuginfo).
|
||||
Please leave at least symbol names attached to the binary for debugging purposes.
|
||||
|
||||
### QML Module dir
|
||||
Currently all QML modules are statically linked to quickshell, but this is where
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ string(APPEND QS_BUILD_OPTIONS " Distributor: ${DISTRIBUTOR}")
|
|||
|
||||
message(STATUS "Quickshell configuration")
|
||||
message(STATUS " Distributor: ${DISTRIBUTOR}")
|
||||
boption(DISTRIBUTOR_DEBUGINFO_AVAILABLE "Distributor provided debuginfo" NO)
|
||||
boption(NO_PCH "Disable precompild headers (dev)" OFF)
|
||||
boption(BUILD_TESTING "Build tests (dev)" OFF)
|
||||
boption(ASAN "ASAN (dev)" OFF) # note: better output with gcc than clang
|
||||
|
|
|
|||
|
|
@ -56,3 +56,4 @@ set shell id.
|
|||
- `glib` and `polkit` have been added as dependencies when compiling with polkit agent support.
|
||||
- `vulkan-headers` has been added as a build-time dependency for screencopy (Vulkan backend support).
|
||||
- `breakpad` has been replaced by `cpptrace`, which is far easier to package, and the `CRASH_REPORTER` cmake variable has been replaced with `CRASH_HANDLER` to stop this from being easy to ignore.
|
||||
- `DISTRIBUTOR_DEBUGINFO_AVAILABLE` was removed as it is no longer important without breakpad.
|
||||
|
|
|
|||
|
|
@ -15,12 +15,6 @@ else()
|
|||
set(CRASH_HANDLER_DEF 0)
|
||||
endif()
|
||||
|
||||
if (DISTRIBUTOR_DEBUGINFO_AVAILABLE)
|
||||
set(DEBUGINFO_AVAILABLE 1)
|
||||
else()
|
||||
set(DEBUGINFO_AVAILABLE 0)
|
||||
endif()
|
||||
|
||||
configure_file(build.hpp.in build.hpp @ONLY ESCAPE_QUOTES)
|
||||
|
||||
target_include_directories(quickshell-build INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#define QS_UNRELEASED_FEATURES "@UNRELEASED_FEATURES@"
|
||||
#define GIT_REVISION "@GIT_REVISION@"
|
||||
#define DISTRIBUTOR "@DISTRIBUTOR@"
|
||||
#define DISTRIBUTOR_DEBUGINFO_AVAILABLE @DEBUGINFO_AVAILABLE@
|
||||
#define CRASH_HANDLER @CRASH_HANDLER_DEF@
|
||||
#define BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
||||
#define COMPILER "@CMAKE_CXX_COMPILER_ID@ (@CMAKE_CXX_COMPILER_VERSION@)"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "handler.hpp"
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
|
@ -64,8 +65,18 @@ void signalHandler(
|
|||
for (size_t i = 0; i < static_cast<size_t>(frameCount); i++) {
|
||||
auto frame = cpptrace::safe_object_frame();
|
||||
cpptrace::get_safe_object_frame(traceBuffer[i], &frame);
|
||||
write(CrashInfo::INSTANCE.traceFd, &frame, sizeof(cpptrace::safe_object_frame));
|
||||
|
||||
auto* wptr = reinterpret_cast<char*>(&frame);
|
||||
auto* end = wptr + sizeof(cpptrace::safe_object_frame); // NOLINT
|
||||
while (wptr != end) {
|
||||
auto r = write(CrashInfo::INSTANCE.traceFd, &frame, sizeof(cpptrace::safe_object_frame));
|
||||
if (r < 0 && errno == EINTR) continue;
|
||||
if (r <= 0) goto fail;
|
||||
wptr += r; // NOLINT
|
||||
}
|
||||
}
|
||||
|
||||
fail:;
|
||||
}
|
||||
|
||||
auto coredumpPid = fork();
|
||||
|
|
@ -168,7 +179,6 @@ void CrashHandler::init() {
|
|||
// Set up alternate signal stack for stack overflow handling
|
||||
auto ss = stack_t();
|
||||
ss.ss_sp = new char[SIGSTKSZ];
|
||||
;
|
||||
ss.ss_size = SIGSTKSZ;
|
||||
ss.ss_flags = 0;
|
||||
sigaltstack(&ss, nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue