Skip to content

Commit

Permalink
Merge pull request futuretap#27 from jspahrsummers/swift-updates
Browse files Browse the repository at this point in the history
Swift and Xcode 6 updates
  • Loading branch information
jspahrsummers committed Jun 25, 2014
2 parents bbb2bee + 8044261 commit 59dbf7d
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 38 deletions.
18 changes: 12 additions & 6 deletions Base/Common.xcconfig
Expand Up @@ -4,6 +4,12 @@
// instead.
//

// Disable legacy-compatible header searching
ALWAYS_SEARCH_USER_PATHS = NO

// Architectures to build
ARCHS = $(ARCHS_STANDARD)

// Whether to warn when a floating-point value is used as a loop counter
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES

Expand All @@ -13,6 +19,9 @@ CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
// Whether to warn about strcpy() and strcat()
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES

// Whether to enable module imports
CLANG_ENABLE_MODULES = YES

// Enable ARC
CLANG_ENABLE_OBJC_ARC = YES

Expand Down Expand Up @@ -59,6 +68,9 @@ CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
// The format of debugging symbols
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym

// Whether to require objc_msgSend to be cast before invocation
ENABLE_STRICT_OBJC_MSGSEND = YES

// Which C variant to use
GCC_C_LANGUAGE_STANDARD = gnu99

Expand Down Expand Up @@ -152,11 +164,5 @@ GCC_WARN_UNUSED_VARIABLE = YES
// Whether to run the static analyzer with every build
RUN_CLANG_STATIC_ANALYZER = YES

// Whether to run unit tests with every build
TEST_AFTER_BUILD = NO

// Don't treat unknown warnings as errors, and disable GCC compatibility warnings and unused static const variable warnings
WARNING_CFLAGS = -Wno-error=unknown-warning-option -Wno-gcc-compat -Wno-unused-const-variable

// Disable legacy-compatible header searching
ALWAYS_SEARCH_USER_PATHS = NO
8 changes: 8 additions & 0 deletions Base/Configurations/Debug.xcconfig
Expand Up @@ -27,9 +27,17 @@ ONLY_ACTIVE_ARCH = YES
// These settings catch some errors in integer arithmetic
OTHER_CFLAGS = -ftrapv

// Other flags to pass to the Swift compiler
//
// This enables conditional compilation with #if DEBUG
OTHER_SWIFT_FLAGS = -D DEBUG

// Whether to strip debugging symbols when copying the built product to its
// final installation location
STRIP_INSTALLED_PRODUCT = NO

// The optimization level (-Onone, -O, -Ofast) for the produced Swift binary
SWIFT_OPTIMIZATION_LEVEL = -Onone

// Disable Developer ID timestamping
OTHER_CODE_SIGN_FLAGS = --timestamp=none
3 changes: 3 additions & 0 deletions Base/Configurations/Release.xcconfig
Expand Up @@ -26,5 +26,8 @@ ONLY_ACTIVE_ARCH = NO
// final installation location
STRIP_INSTALLED_PRODUCT = YES

// The optimization level (-Onone, -O, -Ofast) for the produced Swift binary
SWIFT_OPTIMIZATION_LEVEL = -O

// Whether to perform App Store validation checks
VALIDATE_PRODUCT = YES
4 changes: 4 additions & 0 deletions Base/Targets/Application.xcconfig
Expand Up @@ -6,3 +6,7 @@

// Whether to strip out code that isn't called from anywhere
DEAD_CODE_STRIPPING = NO

// Sets the @rpath for the application such that it can include frameworks in
// the application bundle (inside the "Frameworks" folder)
LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks @loader_path/../Frameworks
27 changes: 27 additions & 0 deletions Base/Targets/Framework.xcconfig
@@ -0,0 +1,27 @@
//
// This file defines additional configuration options that are appropriate only
// for a framework. Typically, you want to use a platform-specific variant
// instead.
//

// Whether to strip out code that isn't called from anywhere
DEAD_CODE_STRIPPING = NO

// Whether this framework should define an LLVM module
DEFINES_MODULE = YES

// Whether function calls should be position-dependent (should always be
// disabled for library code)
GCC_DYNAMIC_NO_PIC = NO

// Enables the framework to be included from any location as long as the
// loader’s runpath search paths includes it. For example from an application
// bundle (inside the "Frameworks" folder) or shared folder
INSTALL_PATH = @rpath
LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME)
SKIP_INSTALL = YES

// When compiling this library, look for imports (written with quotes) in the
// library's own folder first. This avoids conflicts from other headers in the
// build folder.
USER_HEADER_SEARCH_PATHS = ./**
4 changes: 0 additions & 4 deletions Mac OS X/Mac-Application.xcconfig
Expand Up @@ -13,7 +13,3 @@
// Whether function calls should be position-dependent (should always be
// disabled for library code)
GCC_DYNAMIC_NO_PIC = YES

// Sets the @rpath for the application such that it can include frameworks in
// the application bundle (inside the "Frameworks" folder)
LD_RUNPATH_SEARCH_PATHS = @loader_path/../Frameworks
2 changes: 1 addition & 1 deletion Mac OS X/Mac-Base.xcconfig
Expand Up @@ -16,4 +16,4 @@ SDKROOT = macosx
SUPPORTED_PLATFORMS = macosx

// Supported architectures
VALID_ARCHS = i386 x86_64
VALID_ARCHS = x86_64
26 changes: 5 additions & 21 deletions Mac OS X/Mac-Framework.xcconfig
@@ -1,27 +1,11 @@
//
// This file defines additional configuration options that are appropriate only
// for a framework. This should be set at the target level for each project
// configuration.
// for a framework on OS X. This should be set at the target level for each
// project configuration.
//

// Import base framework settings
#include "../Base/Targets/Framework.xcconfig"

// Import common settings specific to Mac OS X
#include "Mac-Base.xcconfig"

// Whether to strip out code that isn't called from anywhere
DEAD_CODE_STRIPPING = NO

// Whether function calls should be position-dependent (should always be
// disabled for library code)
GCC_DYNAMIC_NO_PIC = NO

// Enables the framework to be included from any location as long as the
// loader’s runpath search paths includes it. For example from an application
// bundle (inside the "Frameworks" folder) or shared folder
INSTALL_PATH = @rpath
LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME)
SKIP_INSTALL = YES

// When compiling this library, look for imports (written with quotes) in the
// library's own folder first. This avoids conflicts from other headers in the
// build folder.
USER_HEADER_SEARCH_PATHS = ./**
9 changes: 3 additions & 6 deletions iOS/iOS-Base.xcconfig
Expand Up @@ -4,8 +4,8 @@
// a configuration file for a specific type of target.
//

// Architectures to build
ARCHS = $(ARCHS_STANDARD_INCLUDING_64_BIT)
// Xcode needs this to find archived headers if SKIP_INSTALL is set
HEADER_SEARCH_PATHS = $(OBJROOT)/UninstalledProducts/include

// Whether to only build the active architecture (overridden from Debug/Profile)
ONLY_ACTIVE_ARCH = NO
Expand All @@ -14,11 +14,8 @@ ONLY_ACTIVE_ARCH = NO
// assumed)
SDKROOT = iphoneos

// Xcode needs this to find archived headers if SKIP_INSTALL is set
HEADER_SEARCH_PATHS = $(OBJROOT)/UninstalledProducts/include

// Supported SDK platforms
SUPPORTED_PLATFORMS = iphonesimulator iphoneos

// Supported architectures
VALID_ARCHS = armv6 armv7 armv7s arm64 i386 x86_64
VALID_ARCHS = armv7 armv7s arm64 x86_64
11 changes: 11 additions & 0 deletions iOS/iOS-Framework.xcconfig
@@ -0,0 +1,11 @@
//
// This file defines additional configuration options that are appropriate only
// for a framework. This should be set at the target level for each project
// configuration.
//

// Import base framework settings
#include "../Base/Targets/Framework.xcconfig"

// Import common settings specific to iOS
#include "iOS-Base.xcconfig"

0 comments on commit 59dbf7d

Please sign in to comment.