@@ -146,7 +146,8 @@ func xcodeProject(
146146 projectSettings. common. COMBINE_HIDPI_IMAGES = " YES "
147147
148148 // Defined for regular `swift build` instantiations, so also should be defined here.
149- projectSettings. common. SWIFT_ACTIVE_COMPILATION_CONDITIONS += [ " SWIFT_PACKAGE " ]
149+ projectSettings. common. SWIFT_ACTIVE_COMPILATION_CONDITIONS += [ " $(inherited) " , " SWIFT_PACKAGE " ]
150+ projectSettings. common. GCC_PREPROCESSOR_DEFINITIONS += [ " $(inherited) " , " SWIFT_PACKAGE=1 " ]
150151
151152 // Opt out of headermaps. The semantics of the build should be explicitly
152153 // defined by the project structure, so that we don't get any additional
@@ -161,10 +162,10 @@ func xcodeProject(
161162 projectSettings. debug. DEBUG_INFORMATION_FORMAT = " dwarf "
162163 projectSettings. debug. ENABLE_NS_ASSERTIONS = " YES "
163164 projectSettings. debug. GCC_OPTIMIZATION_LEVEL = " 0 "
164- projectSettings. debug. GCC_PREPROCESSOR_DEFINITIONS = [ " DEBUG=1 " , " $(inherited) " ]
165+ projectSettings. debug. GCC_PREPROCESSOR_DEFINITIONS = [ " $(inherited) " , " DEBUG=1 " ]
165166 projectSettings. debug. ONLY_ACTIVE_ARCH = " YES "
166167 projectSettings. debug. SWIFT_OPTIMIZATION_LEVEL = " -Onone "
167- projectSettings. debug. SWIFT_ACTIVE_COMPILATION_CONDITIONS += [ " SWIFT_PACKAGE " , " DEBUG " ]
168+ projectSettings. debug. SWIFT_ACTIVE_COMPILATION_CONDITIONS += [ " $(inherited) " , " DEBUG " ]
168169
169170 // Add some release-specific settings.
170171 projectSettings. release. COPY_PHASE_STRIP = " YES "
0 commit comments