summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders F Björklund <anders.f.bjorklund@gmail.com>2018-08-27 19:25:55 +0200
committerAnders F Björklund <anders.f.bjorklund@gmail.com>2018-08-27 19:29:17 +0200
commit8d352b0a64457a55a61b05306b34ff11826705a4 (patch)
tree919dc2198c4b66a57258d1e9330f2dbad64af945
parent92f8b27d4e8fbeb618dfe23652cf868430617f4b (diff)
downloadccache-8d352b0a64457a55a61b05306b34ff11826705a4.tar.gz
Register debug_end as an exit function instead
-rw-r--r--src/ccache.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ccache.c b/src/ccache.c
index 3cf5d382..28046a0f 100644
--- a/src/ccache.c
+++ b/src/ccache.c
@@ -2070,10 +2070,6 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
break;
}
- if (conf->debug) {
- debug_end();
- }
-
// And exit with the right status code.
x_exit(0);
}
@@ -3385,6 +3381,7 @@ ccache(int argc, char *argv[])
if (conf->debug) {
debug_start(output_obj);
+ exitfn_add_nullary(debug_end);
}
struct mdfour common_hash;
@@ -3470,10 +3467,6 @@ ccache(int argc, char *argv[])
// Run real compiler, sending output to cache.
to_cache(compiler_args);
- if (conf->debug) {
- debug_end();
- }
-
x_exit(0);
}