Skip to content

Commit d1f798b

Browse files
authored
Merge pull request swiftlang#31548 from compnerd/analytical-methods
build: remove `ANALYZE_CODE_COVERAGE` from `_add_host_variant_c_compi…
2 parents 417f1f1 + d5c2bc2 commit d1f798b

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ endfunction()
7878

7979
# Usage:
8080
# _add_host_variant_c_compile_link_flags(
81-
# ANALYZE_CODE_COVERAGE analyze_code_coverage
8281
# RESULT_VAR_NAME result_var_name
8382
# )
8483
function(_add_host_variant_c_compile_link_flags)
85-
set(oneValueArgs RESULT_VAR_NAME ANALYZE_CODE_COVERAGE)
84+
set(oneValueArgs RESULT_VAR_NAME)
8685
cmake_parse_arguments(CFLAGS
8786
""
8887
"${oneValueArgs}"
@@ -131,11 +130,6 @@ function(_add_host_variant_c_compile_link_flags)
131130
"-m${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_VERSION_MIN_NAME}-version-min=${DEPLOYMENT_VERSION}")
132131
endif()
133132

134-
if(CFLAGS_ANALYZE_CODE_COVERAGE)
135-
list(APPEND result "-fprofile-instr-generate"
136-
"-fcoverage-mapping")
137-
endif()
138-
139133
_compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO}" _lto_flag_out)
140134
if (_lto_flag_out)
141135
list(APPEND result "${_lto_flag_out}")
@@ -146,9 +140,7 @@ endfunction()
146140

147141

148142
function(_add_host_variant_c_compile_flags target)
149-
_add_host_variant_c_compile_link_flags(
150-
ANALYZE_CODE_COVERAGE FALSE
151-
RESULT_VAR_NAME result)
143+
_add_host_variant_c_compile_link_flags(RESULT_VAR_NAME result)
152144
target_compile_options(${target} PRIVATE
153145
${result})
154146

@@ -313,9 +305,7 @@ function(_add_host_variant_c_compile_flags target)
313305
endfunction()
314306

315307
function(_add_host_variant_link_flags target)
316-
_add_host_variant_c_compile_link_flags(
317-
ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
318-
RESULT_VAR_NAME result)
308+
_add_host_variant_c_compile_link_flags(RESULT_VAR_NAME result)
319309
target_link_options(${target} PRIVATE
320310
${result})
321311

0 commit comments

Comments
 (0)