aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/nvptx
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2022-08-19 16:09:28 +0200
committerTobias Burnus <tobias@codesourcery.com>2022-08-19 16:09:28 +0200
commit713ec97e593bd4d9915a13bc4047f064fec0e24a (patch)
treed353f0f80504617372572a6d9fe929479f4db869 /gcc/config/nvptx
parent338a296dd76bf3d253a990ddb65e1bbef0c680a7 (diff)
downloadgcc-713ec97e593bd4d9915a13bc4047f064fec0e24a.zip
gcc-713ec97e593bd4d9915a13bc4047f064fec0e24a.tar.gz
gcc-713ec97e593bd4d9915a13bc4047f064fec0e24a.tar.bz2
mkoffload: Cleanup temporary omp_requires_file
The file (suffix ".mkoffload.omp_requires") used to save the 'omp requires' data has to be passed to maybe_unlink for cleanup or -v -save-temps stderr diagnostic. That was missed before. - For GCN, the same has to be done for the files with suffix ".mkoffload.dbg.o". gcc/ChangeLog: * config/gcn/mkoffload.cc (main): Add omp_requires_file and dbgobj to files_to_cleanup. * config/i386/intelmic-mkoffload.cc (prepare_target_image): Add omp_requires_file to temp_files. * config/nvptx/mkoffload.cc (omp_requires_file): New global static var. (main): Remove local omp_requires_file var. (tool_cleanup): Handle omp_requires_file.
Diffstat (limited to 'gcc/config/nvptx')
-rw-r--r--gcc/config/nvptx/mkoffload.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/nvptx/mkoffload.cc b/gcc/config/nvptx/mkoffload.cc
index 0fa5f44..3eea0a8 100644
--- a/gcc/config/nvptx/mkoffload.cc
+++ b/gcc/config/nvptx/mkoffload.cc
@@ -55,6 +55,7 @@ static id_map *var_ids, **vars_tail = &var_ids;
/* 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;
@@ -68,6 +69,8 @@ tool_cleanup (bool from_signal ATTRIBUTE_UNUSED)
maybe_unlink (ptx_cfile_name);
if (ptx_name)
maybe_unlink (ptx_name);
+ if (omp_requires_file)
+ maybe_unlink (omp_requires_file);
}
static void
@@ -586,7 +589,6 @@ main (int argc, char **argv)
unsetenv ("COMPILER_PATH");
unsetenv ("LIBRARY_PATH");
- char *omp_requires_file;
if (save_temps)
omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL);
else