aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-17 20:31:46 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-17 20:31:46 -0400
commit2b2eff0987ad3f7e46c39906f32680bc61f48c87 (patch)
tree6195e97d3cf5316faa6269ea6dfedc514198dcff
parentb49d5200aa92aaa1dca47b727d6cc6274da47199 (diff)
Better error checking
-rw-r--r--tomo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tomo.c b/tomo.c
index 04ff6cd6..1115c43c 100644
--- a/tomo.c
+++ b/tomo.c
@@ -341,6 +341,7 @@ void build_library(Text_t lib_dir_name)
Path_t f = *(Path_t*)(tm_files.data + i*tm_files.stride);
prog = run_cmd("nm -Ug -fjust-symbols '%s' | sed -n 's/_\\$\\(.*\\)/\\0 _$%s$\\1/p' >>.build/symbol_renames.txt",
Path$as_c_string(build_file(f, ".o")), CORD_to_const_char_star(env->libname));
+ if (!prog) errx(1, "Could not find symbols!");
int status = pclose(prog);
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
errx(WEXITSTATUS(status), "Failed to create symbol rename table with `nm` and `sed`");