[clang] 7ac4e46 - [Clang] Fix multiple spellings of 'save-temps'
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 6 09:08:35 PST 2025
Author: Joseph Huber
Date: 2025-02-06T11:07:39-06:00
New Revision: 7ac4e46b5ca97a15d63ec86ec7eac6cdca1010e7
URL: https://github.com/llvm/llvm-project/commit/7ac4e46b5ca97a15d63ec86ec7eac6cdca1010e7
DIFF: https://github.com/llvm/llvm-project/commit/7ac4e46b5ca97a15d63ec86ec7eac6cdca1010e7.diff
LOG: [Clang] Fix multiple spellings of 'save-temps'
Summary:
Apparently the driver will expand `save-temps` to the EQ form sometimes,
which made this not work all the time.
Added:
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index bf6797d00e128e..c0891d46b0a62c 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -9179,6 +9179,7 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
OPT_foptimization_record_file_EQ,
OPT_foptimization_record_passes_EQ,
OPT_save_temps,
+ OPT_save_temps_EQ,
OPT_mcode_object_version_EQ,
OPT_load,
OPT_fno_lto,
@@ -9247,7 +9248,8 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("--embed-bitcode");
// Save temporary files created by the linker wrapper.
- if (Args.hasArg(options::OPT_save_temps))
+ if (Args.hasArg(options::OPT_save_temps_EQ) ||
+ Args.hasArg(options::OPT_save_temps))
CmdArgs.push_back("--save-temps");
// Pass in the C library for GPUs if present and not disabled.
More information about the cfe-commits
mailing list