}
else
dbgobj = make_temp_file (".mkoffload.dbg.o");
+ obstack_ptr_grow (&files_to_cleanup, dbgobj);
/* If the copy fails then just ignore it. */
if (copy_early_debug_info (argv[ix], dbgobj))
omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL);
else
omp_requires_file = make_temp_file (".mkoffload.omp_requires");
+ obstack_ptr_grow (&files_to_cleanup, omp_requires_file);
/* Run the compiler pass. */
xputenv (concat ("GCC_OFFLOAD_OMP_REQUIRES_FILE=", omp_requires_file, NULL));
omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL);
else
omp_requires_file = make_temp_file (".mkoffload.omp_requires");
+ temp_files[num_temps++] = omp_requires_file;
xputenv (concat ("GCC_OFFLOAD_OMP_REQUIRES_FILE=", omp_requires_file, NULL));
compile_for_target (&argv_obstack);
/* Files to unlink. */
static const char *ptx_name;
static const char *ptx_cfile_name;
+static const char *omp_requires_file;
static const char *ptx_dumpbase;
enum offload_abi offload_abi = OFFLOAD_ABI_UNSET;
maybe_unlink (ptx_cfile_name);
if (ptx_name)
maybe_unlink (ptx_name);
+ if (omp_requires_file)
+ maybe_unlink (omp_requires_file);
}
static void
unsetenv ("COMPILER_PATH");
unsetenv ("LIBRARY_PATH");
- char *omp_requires_file;
if (save_temps)
omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL);
else