Merge pull request #82166 from Steelskin/fabrice/6.2-line-directive

🍒 [6.2] line-directive: Stop expanding response files
This commit is contained in:
Saleem Abdulrasool
2025-07-15 11:40:13 -07:00
committed by GitHub
2 changed files with 24 additions and 17 deletions

View File

@@ -1015,13 +1015,13 @@ function(_compile_swift_files
# need to work around this by avoiding long command line arguments. This can
# be achieved by writing the list of file paths to a file, then reading that
# list in the Python script.
string(REPLACE ";" "'\n'" source_files_quoted "${source_files}")
string(SHA1 file_name "'${source_files_quoted}'")
string(REPLACE ";" "\n" source_files_quoted "${source_files}")
string(SHA1 file_name "${source_files_quoted}")
set(file_path_target "filelist-${file_name}")
set(file_path "${CMAKE_CURRENT_BINARY_DIR}/${file_name}.txt")
if (NOT TARGET ${file_path_target})
file(WRITE "${file_path}.tmp" "'${source_files_quoted}'")
file(WRITE "${file_path}.tmp" "${source_files_quoted}")
add_custom_command_target(unused_var
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${file_path}.tmp" "${file_path}"
CUSTOM_TARGET_NAME ${file_path_target}