From c05db6052841f1e26a0b3d282c12e75838970e5a Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Fri, 9 Oct 2015 16:03:09 -0700 Subject: [PATCH] Use shared things from xctoolchain. --- .clang-format | 72 +------------------ .gitmodules | 3 + Configurations/Shared | 1 + Configurations/Shared/Common.xcconfig | 21 ------ Configurations/Shared/Platform/OSX.xcconfig | 11 --- Configurations/Shared/Platform/iOS.xcconfig | 21 ------ .../Shared/Platform/watchOS.xcconfig | 14 ---- .../Shared/Product/Application.xcconfig | 14 ---- .../Shared/Product/Framework.xcconfig | 19 ----- .../Shared/Product/UnitTest.xcconfig | 15 ---- Configurations/Shared/Project/Debug.xcconfig | 22 ------ .../Shared/Project/Release.xcconfig | 18 ----- Configurations/Shared/Warnings.xcconfig | 43 ----------- Vendor/xctoolchain | 1 + 14 files changed, 6 insertions(+), 269 deletions(-) mode change 100644 => 120000 .clang-format create mode 100644 .gitmodules create mode 120000 Configurations/Shared delete mode 100644 Configurations/Shared/Common.xcconfig delete mode 100644 Configurations/Shared/Platform/OSX.xcconfig delete mode 100644 Configurations/Shared/Platform/iOS.xcconfig delete mode 100644 Configurations/Shared/Platform/watchOS.xcconfig delete mode 100644 Configurations/Shared/Product/Application.xcconfig delete mode 100644 Configurations/Shared/Product/Framework.xcconfig delete mode 100644 Configurations/Shared/Product/UnitTest.xcconfig delete mode 100644 Configurations/Shared/Project/Debug.xcconfig delete mode 100644 Configurations/Shared/Project/Release.xcconfig delete mode 100644 Configurations/Shared/Warnings.xcconfig create mode 160000 Vendor/xctoolchain diff --git a/.clang-format b/.clang-format deleted file mode 100644 index bdf01dc..0000000 --- a/.clang-format +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2015-present, Parse, LLC. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. - ---- -Language: Cpp -BasedOnStyle: LLVM -AccessModifierOffset: -2 -AlignAfterOpenBracket: true -AlignEscapedNewlinesLeft: true -AlignOperands: true -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortIfStatementsOnASingleLine: true -AllowShortLoopsOnASingleLine: false -AllowShortFunctionsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: false -AlwaysBreakTemplateDeclarations: false -AlwaysBreakBeforeMultilineStrings: false -BreakBeforeBinaryOperators: None -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: true -BinPackParameters: true -BinPackArguments: true -ColumnLimit: 0 -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -DerivePointerAlignment: true -ExperimentalAutoDetectBinPacking: true -IndentCaseLabels: true -IndentWrappedFunctionNames: true -IndentFunctionDeclarationAfterType: true -MaxEmptyLinesToKeep: 1 -KeepEmptyLinesAtTheStartOfBlocks: true -NamespaceIndentation: None -ObjCBlockIndentWidth: 4 -ObjCSpaceAfterProperty: true -ObjCSpaceBeforeProtocolList: true -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakString: 1000 -PenaltyBreakFirstLessLess: 140 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 120 -PointerAlignment: Right -SpacesBeforeTrailingComments: 1 -Cpp11BracedListStyle: true -Standard: Cpp11 -IndentWidth: 4 -TabWidth: 4 -UseTab: Never -BreakBeforeBraces: Attach -SpacesInParentheses: false -SpacesInSquareBrackets: false -SpacesInAngles: false -SpaceInEmptyParentheses: false -SpacesInCStyleCastParentheses: false -SpaceAfterCStyleCast: false -SpacesInContainerLiterals: true -SpaceBeforeAssignmentOperators: true -ContinuationIndentWidth: 4 -CommentPragmas: '^ IWYU pragma:' -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -SpaceBeforeParens: ControlStatements -DisableFormat: false -... diff --git a/.clang-format b/.clang-format new file mode 120000 index 0000000..4adbf79 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +Vendor/xctoolchain/.clang-format \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..aa20c66 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Vendor/xctoolchain"] + path = Vendor/xctoolchain + url = https://github.com/ParsePlatform/xctoolchain.git diff --git a/Configurations/Shared b/Configurations/Shared new file mode 120000 index 0000000..818aee7 --- /dev/null +++ b/Configurations/Shared @@ -0,0 +1 @@ +../Vendor/xctoolchain/Configurations/ \ No newline at end of file diff --git a/Configurations/Shared/Common.xcconfig b/Configurations/Shared/Common.xcconfig deleted file mode 100644 index de2de31..0000000 --- a/Configurations/Shared/Common.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -#include "Warnings.xcconfig" - -// Language Settings -CLANG_ENABLE_OBJC_ARC = YES -GCC_C_LANGUAGE_STANDARD = gnu11 -CLANG_CXX_LANGUAGE_STANDARD = gnu++14 -CLANG_CXX_LIBRARY = libstdc++ - -// Search Paths -PARSE_DIR = $(PROJECT_DIR) -VENDOR_DIR = $(PARSE_DIR)/Vendor -ALWAYS_SEARCH_USER_PATHS = NO diff --git a/Configurations/Shared/Platform/OSX.xcconfig b/Configurations/Shared/Platform/OSX.xcconfig deleted file mode 100644 index db20c6a..0000000 --- a/Configurations/Shared/Platform/OSX.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -SDKROOT = macosx -MACOSX_DEPLOYMENT_TARGET = 10.9 diff --git a/Configurations/Shared/Platform/iOS.xcconfig b/Configurations/Shared/Platform/iOS.xcconfig deleted file mode 100644 index 5c5affb..0000000 --- a/Configurations/Shared/Platform/iOS.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -SDKROOT = iphoneos -IPHONEOS_DEPLOYMENT_TARGET = 7.0 - -GCC_THUMB_SUPPORT = NO - -ARCHS = $(ARCHS_STANDARD) armv7s -DSTROOT = /tmp/$(PRODUCT_NAME).dst - -CODE_SIGN_IDENTITY = -CODE_SIGNING_REQUIRED = NO - -TARGETED_DEVICE_FAMILY = 1,2 diff --git a/Configurations/Shared/Platform/watchOS.xcconfig b/Configurations/Shared/Platform/watchOS.xcconfig deleted file mode 100644 index 7287106..0000000 --- a/Configurations/Shared/Platform/watchOS.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright (c) 2014, Facebook, Inc. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -SDKROOT = watchos -WATCHOS_DEPLOYMENT_TARGET = 2.0 - -CODE_SIGN_IDENTITY = -CODE_SIGNING_REQUIRED = NO diff --git a/Configurations/Shared/Product/Application.xcconfig b/Configurations/Shared/Product/Application.xcconfig deleted file mode 100644 index 59b9917..0000000 --- a/Configurations/Shared/Product/Application.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -LD_RUNPATH_SEARCH_PATHS = @executable_path/Frameworks - -ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon -ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage -CLANG_ENABLE_MODULES = YES diff --git a/Configurations/Shared/Product/Framework.xcconfig b/Configurations/Shared/Product/Framework.xcconfig deleted file mode 100644 index 9d5cca2..0000000 --- a/Configurations/Shared/Product/Framework.xcconfig +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -ENABLE_NS_ASSERTIONS = NO -MTL_ENABLE_DEBUG_INFO = NO - -DYLIB_COMPATIBILITY_VERSION = 1 -DYLIB_CURRENT_VERSION = 1 - -SKIP_INSTALL = YES - -CLANG_MODULES_AUTOLINK = NO -CLANG_ENABLE_MODULES = YES diff --git a/Configurations/Shared/Product/UnitTest.xcconfig b/Configurations/Shared/Product/UnitTest.xcconfig deleted file mode 100644 index a4ab7b9..0000000 --- a/Configurations/Shared/Product/UnitTest.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -OTHER_LDFLAGS = $(inherited) -ObjC -framework XCTest -BUNDLE_LOADER = $(TEST_HOST) - -LD_RUNPATH_SEARCH_PATHS = $(inherited) @loader_path/Frameworks @executable_path/Frameworks -USER_HEADER_SEARCH_PATHS = $(value) $(PARSE_DIR)/Tests/** -CLANG_ENABLE_MODULES = YES diff --git a/Configurations/Shared/Project/Debug.xcconfig b/Configurations/Shared/Project/Debug.xcconfig deleted file mode 100644 index c5882bc..0000000 --- a/Configurations/Shared/Project/Debug.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -#include "../Common.xcconfig" - -GCC_OPTIMIZATION_LEVEL = 0 -SWIFT_OPTIMIZATION_LEVEL = -Onone - -GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 -ONLY_ACTIVE_ARCH = YES - -ENABLE_TESTABILITY = YES - -SANITIZE_FLAGS = -fsanitize-undefined-trap-on-error -fsanitize=undefined-trap -OTHER_CFLAGS = $(value) $(SANITIZE_FLAGS) -OTHER_LDFLAGS = $(value) $(SANITIZE_FLAGS) diff --git a/Configurations/Shared/Project/Release.xcconfig b/Configurations/Shared/Project/Release.xcconfig deleted file mode 100644 index 8570b87..0000000 --- a/Configurations/Shared/Project/Release.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -#include "../Common.xcconfig" - -GCC_OPTIMIZATION_LEVEL = s -SWIFT_OPTIMIZATION_LEVEL = -O - -VALIDATE_PRODUCT = YES - -DEPLOYMENT_POSTPROCESSING = YES -STRIP_STYLE = debugging diff --git a/Configurations/Shared/Warnings.xcconfig b/Configurations/Shared/Warnings.xcconfig deleted file mode 100644 index 75ebeb5..0000000 --- a/Configurations/Shared/Warnings.xcconfig +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) 2015-present, Parse, LLC. -// All rights reserved. -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -ENABLE_STRICT_OBJC_MSGSEND = YES - -GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES -GCC_WARN_ABOUT_MISSING_NEWLINE = YES -GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES -GCC_WARN_CHECK_SWITCH_STATEMENTS = YES -GCC_WARN_MISSING_PARENTHESES = YES -GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES -GCC_WARN_UNKNOWN_PRAGMAS = YES -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_LABEL = YES -GCC_WARN_UNUSED_VALUE = YES -GCC_WARN_UNUSED_VARIABLE = YES -GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES -GCC_WARN_UNDECLARED_SELECTOR = YES -GCC_WARN_64_TO_32_BIT_CONVERSION = YES -GCC_WARN_UNINITIALIZED_AUTOS = YES - -CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES -CLANG_WARN_CONSTANT_CONVERSION = YES -CLANG_WARN_DOCUMENTATION_COMMENTS = YES -CLANG_WARN_EMPTY_BODY = YES -CLANG_WARN_ENUM_CONVERSION = YES -CLANG_WARN_UNREACHABLE_CODE = YES -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES -CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES - -// Errors -GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR -CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR -CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR diff --git a/Vendor/xctoolchain b/Vendor/xctoolchain new file mode 160000 index 0000000..0380e44 --- /dev/null +++ b/Vendor/xctoolchain @@ -0,0 +1 @@ +Subproject commit 0380e440d561904847ba8a8953e3aa81c7ef0fee