Skip to content

Commit 9d94b10

Browse files
committed
Revert "fix(thorvg): expand response files in compiler flags for meson"
This reverts commit e4c7f91. This change was pushed unintentionally during a debug session.
1 parent e4c7f91 commit 9d94b10

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

thorvg/CMakeLists.txt

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -59,41 +59,6 @@ set(compiler_args ${CMAKE_CXX_FLAGS})
5959
separate_arguments(compiler_args)
6060
list(FILTER compiler_args EXCLUDE REGEX "^$")
6161

62-
# Expand response files (arguments starting with @"filename")
63-
# ESP-IDF's latest version uses response files for compiler flags
64-
# These need to be expanded because meson cannot read them from its build context
65-
function(expand_response_files arg_list output_var)
66-
set(expanded_args)
67-
foreach(arg IN LISTS arg_list)
68-
# Check if argument is a response file reference: @"filename" or @filename
69-
if(arg MATCHES "^@\"?(.+)\"?$")
70-
set(response_file "${CMAKE_MATCH_1}")
71-
# Remove quotes if present
72-
string(REGEX REPLACE "^\"(.+)\"$" "\\1" response_file "${response_file}")
73-
# Check if file exists and read its contents
74-
if(EXISTS "${response_file}")
75-
file(READ "${response_file}" file_contents)
76-
# Split file contents into individual arguments
77-
string(REGEX REPLACE "[\r\n]+" ";" file_args "${file_contents}")
78-
separate_arguments(file_args)
79-
list(FILTER file_args EXCLUDE REGEX "^$")
80-
list(APPEND expanded_args ${file_args})
81-
message(STATUS "Expanded response file ${response_file} with ${CMAKE_MATCH_0} arguments")
82-
else()
83-
# Response file doesn't exist yet (created at build time)
84-
# Skip it - essential flags should be provided directly
85-
message(STATUS "Skipping non-existent response file: ${response_file}")
86-
endif()
87-
else()
88-
list(APPEND expanded_args "${arg}")
89-
endif()
90-
endforeach()
91-
set(${output_var} ${expanded_args} PARENT_SCOPE)
92-
endfunction()
93-
94-
expand_response_files("${compiler_args}" compiler_args)
95-
expand_response_files("${linker_args}" linker_args)
96-
9762
message(STATUS "CMAKE_EXE_LINKER_FLAGS: ${linker_args}")
9863
message(STATUS "CMAKE_CXX_FLAGS: ${compiler_args}")
9964

0 commit comments

Comments
 (0)