Skip to content

Commit 7ac4e46

Browse files
committed
[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.
1 parent d566629 commit 7ac4e46

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9179,6 +9179,7 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
91799179
OPT_foptimization_record_file_EQ,
91809180
OPT_foptimization_record_passes_EQ,
91819181
OPT_save_temps,
9182+
OPT_save_temps_EQ,
91829183
OPT_mcode_object_version_EQ,
91839184
OPT_load,
91849185
OPT_fno_lto,
@@ -9247,7 +9248,8 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
92479248
CmdArgs.push_back("--embed-bitcode");
92489249

92499250
// Save temporary files created by the linker wrapper.
9250-
if (Args.hasArg(options::OPT_save_temps))
9251+
if (Args.hasArg(options::OPT_save_temps_EQ) ||
9252+
Args.hasArg(options::OPT_save_temps))
92519253
CmdArgs.push_back("--save-temps");
92529254

92539255
// Pass in the C library for GPUs if present and not disabled.

0 commit comments

Comments
 (0)