From e0bdf3a3a30fa60c4c0678a3ea0c42fe7d6814a6 Mon Sep 17 00:00:00 2001 From: Dave Inglis Date: Mon, 15 Sep 2025 13:58:00 -0400 Subject: [PATCH] Move a build setting from swiftPM to swift-build There was some code in swiftPM that would set CLANG_COVERAGE_MAPPING_LINKER_ARGS = NO if the mach_o_type was "mh_object" due to some duplicate symbol problems, this change moves it down to the objfile product type spec where it belongs. --- Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec b/Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec index 647cdaea..fbe68f45 100644 --- a/Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec +++ b/Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec @@ -164,6 +164,10 @@ GCC_INLINES_ARE_PRIVATE_EXTERN = YES; KEEP_PRIVATE_EXTERNS = YES; DEAD_CODE_STRIPPING = NO; + // Disable code coverage linker flags since we're producing .o files. + // Otherwise, we will run into duplicated symbols when there are more than one targets that produce .o + // as their product. + CLANG_COVERAGE_MAPPING_LINKER_ARGS = NO; }; PackageTypes = ( com.apple.package-type.mach-o-objfile