Ship debug symbols alongside the binaries#947
Conversation
There was a problem hiding this comment.
2 issues found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cmake/DebugSymbols.cmake">
<violation number="1" location="cmake/DebugSymbols.cmake:47">
P2: `CMAKE_OBJCOPY` used without existence check. Missing tool will break the debug-symbol target at build time. Add a required tool check before creating commands.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| COMPONENT "${EXTRACT_DEBUG_SYMBOLS_COMPONENT}") | ||
| elseif(UNIX) | ||
| add_custom_command(OUTPUT "${BINARY_PATH}.debug" | ||
| COMMAND "${CMAKE_OBJCOPY}" --only-keep-debug |
There was a problem hiding this comment.
P2: CMAKE_OBJCOPY used without existence check. Missing tool will break the debug-symbol target at build time. Add a required tool check before creating commands.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmake/DebugSymbols.cmake, line 47:
<comment>`CMAKE_OBJCOPY` used without existence check. Missing tool will break the debug-symbol target at build time. Add a required tool check before creating commands.</comment>
<file context>
@@ -0,0 +1,61 @@
+ COMPONENT "${EXTRACT_DEBUG_SYMBOLS_COMPONENT}")
+ elseif(UNIX)
+ add_custom_command(OUTPUT "${BINARY_PATH}.debug"
+ COMMAND "${CMAKE_OBJCOPY}" --only-keep-debug
+ "${BINARY_PATH}" "${BINARY_PATH}.debug"
+ COMMAND "${CMAKE_OBJCOPY}" --strip-debug "${BINARY_PATH}"
</file context>
🤖 Augment PR SummarySummary: This PR adds build+install support for shipping debug symbols alongside Sourcemeta One binaries, while keeping the installed executables stripped. Changes:
Technical Notes: The extraction is driven by custom targets ( 🤖 Was this summary useful? React with 👍 or 👎 |
| set(BINARY_OUTPUT_NAME "${TARGET_NAME}") | ||
| endif() | ||
| get_target_property(BINARY_OUTPUT_DIR "${TARGET_NAME}" BINARY_DIR) | ||
| set(BINARY_PATH "${BINARY_OUTPUT_DIR}/${BINARY_OUTPUT_NAME}") |
There was a problem hiding this comment.
cmake/DebugSymbols.cmake:22: Building BINARY_PATH from BINARY_DIR + OUTPUT_NAME ignores runtime output directories, per-config subdirs, and platform suffixes (e.g. .exe). That can make the dsymutil/objcopy custom commands point at a non-existent binary when outputs are redirected (notably on WIN32 where outputs are placed under ${CMAKE_BINARY_DIR}/bin) or when using multi-config generators.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Benchmark Index (enterprise)
Details
| Benchmark suite | Current: de5daf3 | Previous: 90f0040 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
289 ms |
289 ms |
1 |
Add one schema (100 existing) |
29 ms |
28 ms |
1.04 |
Add one schema (1000 existing) |
81 ms |
81 ms |
1 |
Add one schema (10000 existing) |
646 ms |
676 ms |
0.96 |
Update one schema (1 existing) |
20 ms |
21 ms |
0.95 |
Update one schema (101 existing) |
28 ms |
28 ms |
1 |
Update one schema (1001 existing) |
82 ms |
83 ms |
0.99 |
Update one schema (10001 existing) |
660 ms |
696 ms |
0.95 |
Cached rebuild (1 existing) |
6 ms |
6 ms |
1 |
Cached rebuild (101 existing) |
9 ms |
9 ms |
1 |
Cached rebuild (1001 existing) |
28 ms |
29 ms |
0.97 |
Cached rebuild (10001 existing) |
242 ms |
254 ms |
0.95 |
Index 100 schemas |
128 ms |
119 ms |
1.08 |
Index 1000 schemas |
1258 ms |
1152 ms |
1.09 |
Index 10000 schemas |
14248 ms |
14015 ms |
1.02 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Benchmark Index (community)
Details
| Benchmark suite | Current: de5daf3 | Previous: 90f0040 | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
295 ms |
285 ms |
1.04 |
Add one schema (100 existing) |
26 ms |
26 ms |
1 |
Add one schema (1000 existing) |
83 ms |
84 ms |
0.99 |
Add one schema (10000 existing) |
700 ms |
819 ms |
0.85 |
Update one schema (1 existing) |
19 ms |
18 ms |
1.06 |
Update one schema (101 existing) |
28 ms |
27 ms |
1.04 |
Update one schema (1001 existing) |
86 ms |
85 ms |
1.01 |
Update one schema (10001 existing) |
692 ms |
709 ms |
0.98 |
Cached rebuild (1 existing) |
5 ms |
6 ms |
0.83 |
Cached rebuild (101 existing) |
8 ms |
8 ms |
1 |
Cached rebuild (1001 existing) |
29 ms |
30 ms |
0.97 |
Cached rebuild (10001 existing) |
252 ms |
311 ms |
0.81 |
Index 100 schemas |
121 ms |
111 ms |
1.09 |
Index 1000 schemas |
942 ms |
875 ms |
1.08 |
Index 10000 schemas |
15944 ms |
13189 ms |
1.21 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti jv@jviotti.com