From fc7b3d978e8b56426bd471ec56e7f286b0763142 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Fri, 7 Jun 2019 15:53:44 -0700 Subject: [PATCH] Add $(inherited) to OTHER_SWIFT_FLAGS. Other defines in OTHER_SWIFT_FLAGS were being overwritten. Resolves https://bugs.swift.org/browse/SR-10804 --- Sources/Xcodeproj/pbxproj().swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Xcodeproj/pbxproj().swift b/Sources/Xcodeproj/pbxproj().swift index 36b8d85bc34..c3c02758427 100644 --- a/Sources/Xcodeproj/pbxproj().swift +++ b/Sources/Xcodeproj/pbxproj().swift @@ -139,7 +139,9 @@ func xcodeProject( // Also set the `Xcode` build preset in Swift to let code conditionalize on // being built in Xcode. - projectSettings.common.OTHER_SWIFT_FLAGS += ["-DXcode"] + projectSettings.common.OTHER_SWIFT_FLAGS = ["$(inherited)"] + + (projectSettings.common.OTHER_SWIFT_FLAGS ?? []) + + ["-DXcode"] projectSettings.common.MACOSX_DEPLOYMENT_TARGET = "10.10" // Prevent Xcode project upgrade warnings.