diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 20:31:46 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-17 20:31:46 -0400 |
| commit | 2b2eff0987ad3f7e46c39906f32680bc61f48c87 (patch) | |
| tree | 6195e97d3cf5316faa6269ea6dfedc514198dcff | |
| parent | b49d5200aa92aaa1dca47b727d6cc6274da47199 (diff) | |
Better error checking
| -rw-r--r-- | tomo.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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`"); |
