Skip to content

Commit

Permalink
[Xcodeproj] Add $(inherited) to OTHER_SWIFT_FLAGS
Browse files Browse the repository at this point in the history
<rdar://problem/50768026>
https://bugs.swift.org/browse/SR-10804
  • Loading branch information
ankitspd committed Jun 26, 2019
1 parent 2e45e5b commit 6ebfec3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
File renamed without changes.
Expand Up @@ -126,6 +126,10 @@ func xcodeProject(
// paths so that all the products can be found.
projectSettings.common.DYLIB_INSTALL_NAME_BASE = "@rpath"

// Set the `Xcode` build preset in Swift to let code conditionalize on
// being built in Xcode.
projectSettings.common.OTHER_SWIFT_FLAGS = ["$(inherited)", "-DXcode"]

// Add any additional compiler and linker flags the user has specified.
if !options.flags.cCompilerFlags.isEmpty {
projectSettings.common.OTHER_CFLAGS = options.flags.cCompilerFlags
Expand All @@ -134,12 +138,9 @@ func xcodeProject(
projectSettings.common.OTHER_LDFLAGS = options.flags.linkerFlags
}
if !options.flags.swiftCompilerFlags.isEmpty {
projectSettings.common.OTHER_SWIFT_FLAGS = options.flags.swiftCompilerFlags
projectSettings.common.OTHER_SWIFT_FLAGS += options.flags.swiftCompilerFlags
}

// 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.MACOSX_DEPLOYMENT_TARGET = "10.10"

// Prevent Xcode project upgrade warnings.
Expand Down

0 comments on commit 6ebfec3

Please sign in to comment.