Skip to content

build: remove TARGET_SDKS from the runtime #5942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions stdlib/public/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ set(swift_runtime_sources
Once.cpp
Portability.cpp
ProtocolConformance.cpp
ReflectionNative.cpp
RuntimeEntrySymbols.cpp
SwiftObjectNative.cpp)
RuntimeEntrySymbols.cpp)

# Acknowledge that the following sources are known.
set(LLVM_OPTIONAL_SOURCES
Expand Down Expand Up @@ -119,16 +117,7 @@ add_swift_library(swiftRuntime OBJECT_LIBRARY TARGET_LIBRARY
${swift_runtime_leaks_sources}
C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
LINK_FLAGS ${swift_runtime_linker_flags}
INSTALL_IN_COMPONENT never_install
TARGET_SDKS ALL_APPLE_PLATFORMS)

add_swift_library(swiftRuntime OBJECT_LIBRARY TARGET_LIBRARY
${swift_runtime_sources}
${swift_runtime_leaks_sources}
C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
LINK_FLAGS ${swift_runtime_linker_flags}
INSTALL_IN_COMPONENT never_install
TARGET_SDKS ANDROID CYGWIN FREEBSD LINUX)
INSTALL_IN_COMPONENT never_install)

set(ELFISH_SDKS)
foreach(sdk ${SWIFT_CONFIGURED_SDKS})
Expand Down
5 changes: 5 additions & 0 deletions stdlib/public/runtime/ErrorObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#include "swift/Runtime/Debug.h"
#include "swift/Runtime/ObjCBridge.h"
#include "swift/Basic/Lazy.h"
Expand Down Expand Up @@ -592,3 +595,5 @@ static void _swift_willThrow_(SwiftError *error) { }
void swift::swift_willThrow(SwiftError *error) {
return _swift_willThrow(error);
}
#endif

19 changes: 0 additions & 19 deletions stdlib/public/runtime/ReflectionNative.cpp

This file was deleted.

1 change: 1 addition & 0 deletions stdlib/public/runtime/SwiftObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#include <objc/NSObject.h>
#include <objc/runtime.h>
Expand Down
19 changes: 0 additions & 19 deletions stdlib/public/runtime/SwiftObjectNative.cpp

This file was deleted.

8 changes: 4 additions & 4 deletions stdlib/public/runtime/SwiftValue.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#include "SwiftObject.h"
#include "SwiftValue.h"
#include "swift/Basic/Lazy.h"
Expand All @@ -30,10 +33,6 @@
#include <objc/runtime.h>
#include <Foundation/Foundation.h>

#if !SWIFT_OBJC_INTEROP
#error "This file should only be compiled when ObjC interop is enabled."
#endif

using namespace swift;
using namespace swift::hashable_support;

Expand Down Expand Up @@ -380,6 +379,7 @@ - (const OpaqueValue *)_swiftValue {
}

@end
#endif

// TODO: We could pick specialized _SwiftValue subclasses for trivial types
// or for types with known size and alignment characteristics. Probably
Expand Down
5 changes: 5 additions & 0 deletions stdlib/public/stubs/Availability.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#include "swift/Basic/Lazy.h"
#include "swift/Runtime/Debug.h"
#import <Foundation/Foundation.h>
Expand Down Expand Up @@ -93,3 +96,5 @@ static NSOperatingSystemVersion getOSVersion() {

return { version.majorVersion, version.minorVersion, version.patchVersion };
}
#endif

8 changes: 0 additions & 8 deletions stdlib/public/stubs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,8 @@ list(APPEND swift_stubs_c_compile_flags -DswiftCore_EXPORTS)
add_swift_library(swiftStdlibStubs OBJECT_LIBRARY TARGET_LIBRARY
${swift_stubs_sources}
${swift_stubs_objc_sources}
C_COMPILE_FLAGS ${swift_stubs_c_compile_flags}
LINK_FLAGS ${SWIFT_RUNTIME_CORE_LINK_FLAGS}
TARGET_SDKS ALL_APPLE_PLATFORMS
INSTALL_IN_COMPONENT stdlib)

add_swift_library(swiftStdlibStubs OBJECT_LIBRARY TARGET_LIBRARY
${swift_stubs_sources}
${swift_stubs_unicode_normalization_sources}
C_COMPILE_FLAGS ${swift_stubs_c_compile_flags}
LINK_FLAGS ${SWIFT_RUNTIME_CORE_LINK_FLAGS}
TARGET_SDKS ANDROID CYGWIN FREEBSD LINUX
INSTALL_IN_COMPONENT stdlib)

5 changes: 5 additions & 0 deletions stdlib/public/stubs/FoundationHelpers.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#import <CoreFoundation/CoreFoundation.h>
#include "../SwiftShims/CoreFoundationShims.h"

Expand Down Expand Up @@ -112,3 +115,5 @@ static CFRange cast(_swift_shims_CFRange value) {
swift::_swift_stdlib_objcDebugDescription(id _Nonnull nsObject) {
return [nsObject debugDescription];
}
#endif

5 changes: 5 additions & 0 deletions stdlib/public/stubs/OptionalBridgingHelper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#include "swift/Basic/Lazy.h"
#include "swift/Basic/LLVM.h"
#include "swift/Runtime/Metadata.h"
Expand Down Expand Up @@ -97,3 +100,5 @@ id _swift_Foundation_getOptionalNilSentinelObject(const Metadata *Wrapped) {

return objc_retain(getSentinelForDepth(depth));
}
#endif

3 changes: 3 additions & 0 deletions stdlib/public/stubs/Reflection.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#import <Foundation/Foundation.h>

SWIFT_CC(swift)
Expand All @@ -24,4 +26,5 @@

return result;
}
#endif

4 changes: 4 additions & 0 deletions stdlib/public/stubs/SwiftNativeNSXXXBase.mm.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
//
//===----------------------------------------------------------------------===//

#include "swift/Runtime/Config.h"

#if SWIFT_OBJC_INTEROP
#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
#include <objc/NSObject.h>
Expand Down Expand Up @@ -216,6 +219,7 @@ extern "C" void swift_stdlib_CFSetGetValues(NSSet *NS_RELEASES_ARGUMENT set,
CFSetGetValues((__bridge CFSetRef)set, values);
swift_unknownRelease(set);
}
#endif

// ${'Local Variables'}:
// eval: (read-only-mode 1)
Expand Down
3 changes: 3 additions & 0 deletions stdlib/public/stubs/UnicodeNormalization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//
//===----------------------------------------------------------------------===//

#if !defined(__APPLE__)
#include "swift/Basic/Lazy.h"
#include "swift/Runtime/Config.h"
#include "swift/Runtime/Debug.h"
Expand Down Expand Up @@ -283,3 +284,5 @@ swift::_swift_stdlib_unicode_strToLower(uint16_t *Destination,
}

swift::Lazy<ASCIICollation> ASCIICollation::theTable;
#endif