Skip to content

[CMake] Get SwiftCore building with the new build system #77403

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 17 commits into from
Nov 7, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ Runtimes/**/*.def
Runtimes/**/*.gyb
Runtimes/**/*.apinotes
Runtimes/**/*.yaml
Runtimes/**/*.inc
Runtimes/**/*.json
Runtimes/**/*.modulemap
45 changes: 45 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1579,3 +1579,48 @@ if(XCODE)
add_custom_target(Miscellaneous
SOURCES ${SWIFT_TOPLEVEL_HEADERS})
endif()

# New standard library build
option(SWIFT_ENABLE_NEW_RUNTIME_BUILD "Build Swift runtimes with new build system" OFF)
if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)

add_custom_target(PopulateRuntimeSourceDir
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Resync.cmake"
COMMENT "Copying sources into new runtime build")

foreach(sdk ${SWIFT_SDKS})
foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES})
# Provide a mechanism to skip building one of these runtimes
if(SWIFT_SKIP_${sdk}_${arch}_RUNTIME)
message(STATUS "Skipping: ${arch}-${sdk} runtime build")
continue()
endif()
set(stdlib_target "swift-stdlib-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
if(${SWIFT_SDK_${sdk}_${arch}_CACHE})
set(stdlib_cache_file_flag -C ${SWIFT_SDK_${sdk}_${arch}_CACHE})
endif()
ExternalProject_Add("${stdlib_target}-core"
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Core"
# TODO: Add this once we're ready to start swapping out the libraries
# for testing
# INSTALL_DIR "${CMAKE_BINARY_DIR}/"

DEPENDS PopulateRuntimeSourceDir
CMAKE_ARGS
-DCMAKE_INSTALL_LIBDIR:FILEPATH=lib/swift/${SWIFT_SDK_${sdk}_LIB_SUBDIR}/${arch}
# Compiler will see mismatched swift modules and fail initial checks
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
-DBUILD_SHARED_LIBS:BOOLEAN=YES # TODO: Make this configurable
${stdlib_cache_file_flag}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:FILEPATH=<INSTALL_DIR>
-DCMAKE_Swift_COMPILER:FILEPATH=$<IF:$<BOOL:${CMAKE_CROSSCOMPILING}>,${CMAKE_Swift_COMPILER},$<PATH:REPLACE_FILENAME,$<TARGET_FILE:swift-frontend>,swiftc>>
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS})
if(NOT ${CMAKE_CROSSCOMPILING})
add_dependencies("${stdlib_target}" swift-frontend)
endif()
endforeach()
endforeach()
endif()
93 changes: 93 additions & 0 deletions Runtimes/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Notes:
#
# The Demangling library uses `#if SWIFT_HAVE_CRASHREPORTERCLIENT` while the
# runtime library uses `#ifdef SWIFT_HAVE_CRASHREPORTERCLIENT` to toggle that
# functionality. When building the demangling library, the macro should be set
# to 0 or 1 to indicate the presence of the crashreporter.
# When building the runtime library, the existence of the macro indicates the
# presence of the crashreporter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we set it to 1 when enabled and un-set it when disabled? That should work for both.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, C/C++ defines it so that if a -DFOO is passed without a value, it's given the value of 1, and #if FOO will see undefined an 0 the same way. We might be able to get away with just setting it. I'll have to compare the symbol lists though.

#
# Runtime library pulls sources and headers from compiler sources (ThreadSanitizer)
# Demangling library pulls sources and headers from compiler sources (all)
#
#
# gyb pulls sources from compiler sources
#
# Stubs:
# Pulls in headers from compiler
# - include/swift/Basic
# - include/swift/Runtime
# - include/swift/Threading

# TODO:
# Platform support:
# - Work on/Verify cross-compiling
# - Work on/Verify Windows and Linux native builds
# Embedded
# -- -Xfrontend -emit-empty-object-file
# Catalyst Support
# -- Will need shadow invocations to generate swiftmodules for Swift parts
# Install *.abi.json, swiftdoc, and swiftsourceinfo

cmake_minimum_required(VERSION 3.26...3.29)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
include(CMakeWorkarounds)
project(SwiftCore LANGUAGES C CXX Swift VERSION 6.1)

# The Swift standard library is not intended for use as a sub-library as part of
# another project. It is tightly coupled with the compiler version.
if(NOT PROJECT_IS_TOP_LEVEL)
message(FATAL_ERROR "Swift Core must build as a standalone project")
endif()

# FIXME: We should not need to refer back into the compiler sources. This is
# needed by gyb, Demangling, Threading, the runtime (ThreadSanitizer.cpp)
set(SwiftCore_SWIFTC_SOURCE_DIR
"${PROJECT_SOURCE_DIR}/../../"
CACHE FILEPATH "Path to the root source directory of the Swift compiler")

include(GNUInstallDirs)
include(AvailabilityMacros)
include(CompilerSettings)
include(DefaultSettings)
include(EmitSwiftInterface)
include(PlatformInfo)
include(gyb)

defaulted_option(SwiftCore_ENABLE_LIBRARY_EVOLUTION "Generate ABI resilient runtime libraries")

defaulted_option(SwiftCore_ENABLE_CRASH_REPORTER_CLIENT "Enable Apple CrashReporter integration")
defaulted_option(SwiftCore_ENABLE_OBJC_INTEROP "Enable runtime ObjC interop")
defaulted_option(SwiftCore_ENABLE_TYPE_PRINTING "Enable printing type names")
defaulted_option(SwiftCore_ENABLE_VECTOR_TYPES "Enable vector support")
defaulted_option(SwiftCore_ENABLE_REFLECTION "Enable runtime support for mirrors and reflection support")
defaulted_option(SwiftCore_ENABLE_COMMANDLINE_SUPPORT "Enable command line argument support")

defaulted_option(SwiftCore_ENABLE_BACKTRACING "Enable backtracing runtime support")
set(SwiftCore_BACKTRACER_PATH ${SwiftCore_BACKTRACER_PATH_default} CACHE STRING "Set a fixed path to the Swift backtracer")

option(SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS "" OFF)
option(SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER "" OFF)

set(SwiftCore_OBJECT_FORMAT "${SwiftCore_OBJECT_FORMAT_default}" CACHE STRING "Object format")

add_compile_definitions(
$<$<BOOL:${SwiftCore_ENABLE_OBJC_INTEROP}>:-DSWIFT_OBJC_INTEROP>
$<$<BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION}>:-DSWIFT_LIBRARY_EVOLUTION>
$<$<BOOL:${SwiftCore_ENABLE_CRASH_REPORTER_CLIENT}>:-DSWIFT_HAVE_CRASHREPORTERCLIENT>
$<$<BOOL:${SwiftCore_ENABLE_REFLECTION}>:-DSWIFT_ENABLE_REFLECTION>
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER=$<BOOL:${SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER}>>
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=$<BOOL:${SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS}>>)

add_compile_options( $<$<AND:$<COMPILE_LANGUAGE:Swift>,$<BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION}>>:-enable-library-evolution>)

include_directories(include)

add_subdirectory(LLVMSupport)
add_subdirectory(SwiftShims/swift/shims)
add_subdirectory(Demangling)
add_subdirectory(Threading)
add_subdirectory(runtime)
add_subdirectory(stubs)
add_subdirectory(core)
43 changes: 43 additions & 0 deletions Runtimes/Core/Demangling/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# FIXME: Refactor demangling library so that we aren't pulling sources from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reference a swiftlang/swift issue here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add it in a separate PR, but here's the issue: #77462

# the compiler.
add_library(swiftDemangling OBJECT
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/Context.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/Demangler.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/ManglingUtils.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/NodePrinter.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/Punycode.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/Remangler.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/NodeDumper.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/Errors.cpp")
target_compile_definitions(swiftDemangling PRIVATE swiftCore_EXPORTS
$<$<BOOL:${SwiftCore_ENABLE_OBJC_INTEROP}>:-DSWIFT_SUPPORT_OLD_MANGLING>
$<$<BOOL:${SwiftCore_ENABLE_TYPE_PRINTING}>:-DSWIFT_STDLIB_HAS_TYPE_PRINTING>
$<$<BOOL:${SwiftCore_ENABLE_CRASH_REPORTER_CLIENT}>:-DSWIFT_HAVE_CRASHREPORTERCLIENT>)

target_include_directories(swiftDemangling
PRIVATE
"${SwiftCore_SWIFTC_SOURCE_DIR}/include"
"${PROJECT_BINARY_DIR}/include")

target_link_libraries(swiftDemangling PRIVATE swiftShims)

if(SwiftCore_ENABLE_CRASH_REPORTER_CLIENT)
# We could likely pull the copy from the runtime sources
add_library(swiftDemanglingCR OBJECT
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/CrashReporter.cpp")
target_link_libraries(swiftDemanglingCR PRIVATE swiftShims)
endif()

if(SwiftCore_ENABLE_OBJC_INTEROP)
target_sources(swiftDemangling PRIVATE
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/OldDemangler.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Demangling/OldRemangler.cpp")
endif()

if(LINUX OR BSD)
target_compile_options(swiftDemangling PRIVATE -fno-lto)
endif()

if(NOT BUILD_SHARED_LIBS)
install(TARGETS swiftDemangling)
endif()
7 changes: 7 additions & 0 deletions Runtimes/Core/LLVMSupport/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_library(swiftLLVMSupport OBJECT
ErrorHandling.cpp
Hashing.cpp
MemAlloc.cpp
SmallPtrSet.cpp
SmallVector.cpp
StringRef.cpp)
37 changes: 37 additions & 0 deletions Runtimes/Core/SwiftShims/swift/shims/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Swift shim header files
install(FILES
AssertionReporting.h
CoreFoundationShims.h
EmbeddedShims.h
FoundationShims.h
GlobalObjects.h
HeapObject.h
KeyPath.h
LibcOverlayShims.h
LibcShims.h
MetadataSections.h
Random.h
RefCount.h
Reflection.h
RuntimeShims.h
RuntimeStubs.h
SwiftStdbool.h
SwiftStddef.h
SwiftStdint.h
System.h
Target.h
ThreadLocalStorage.h
UnicodeData.h
Visibility.h
_SwiftConcurrency.h
_SwiftDistributed.h
_SynchronizationShims.h
module.modulemap
DESTINATION "${CMAKE_INSTALL_LIBDIR}/swift/shims")

add_library(swiftShims INTERFACE)
target_include_directories(swiftShims INTERFACE
$<$<COMPILE_LANGUAGE:C,CXX>:${CMAKE_CURRENT_SOURCE_DIR}/../../>
$<$<COMPILE_LANGUAGE:Swift>:${CMAKE_CURRENT_SOURCE_DIR}>)
target_compile_options(swiftShims INTERFACE
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/module.modulemap>")
10 changes: 10 additions & 0 deletions Runtimes/Core/Threading/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# TODO: I think we can build the one that actually matters based on the
# platform we're building, rather than relying just on macro definitions
# and linking empty objects.
# https://github.com/swiftlang/swift/issues/77435
add_library(swiftThreading OBJECT
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Threading/C11.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Threading/Linux.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Threading/Pthreads.cpp"
"${SwiftCore_SWIFTC_SOURCE_DIR}/lib/Threading/Win32.cpp")
target_link_libraries(swiftThreading PRIVATE swiftShims)
5 changes: 5 additions & 0 deletions Runtimes/Core/cmake/modules/AvailabilityMacros.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
file(STRINGS "${SwiftCore_SWIFTC_SOURCE_DIR}/utils/availability-macros.def" availability_defs)
list(FILTER availability_defs EXCLUDE REGEX "^\\s*(#.*)?$")
foreach(def ${availability_defs})
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -define-availability -Xfrontend \"${def}\">")
endforeach()
34 changes: 34 additions & 0 deletions Runtimes/Core/cmake/modules/CMakeWorkarounds.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file contains workarounds for dealing with bugs between CMake and the
# Swift compiler.

# This is a workaround to avoid crashing the Swift compiler while typechecking
# swiftCore. The Swift compiler must be run num-threads=0 with WMO in all build
# configurations.
# These must be set in CMake _before_ the Swift language is enabled.
# This is manipulating undocumented CMake-internal variables that may change
# behavior at any time and should not be relied on.
# Otherwise CMake will generate the build graph incorrectly for this setup.
# Ideally this file should not need to exist.

set(CMAKE_Swift_NUM_THREADS 0)
if(POLICY CMP0157)
set(CMAKE_Swift_COMPILE_OBJECT "<CMAKE_Swift_COMPILER> -num-threads ${CMAKE_Swift_NUM_THREADS} -c <DEFINES> <FLAGS> <INCLUDES> <SOURCE>")

set(CMAKE_Swift_COMPILATION_MODE wholemodule)

if(NOT SwiftStdlib_NUM_LINK_JOBS MATCHES "^[0-9]+$")
cmake_host_system_information(RESULT SwiftStdlib_NUM_LINK_JOBS QUERY NUMBER_OF_LOGICAL_CORES)
endif()

set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -num-threads ${SwiftStdlib_NUM_LINK_JOBS} -emit-executable -o <TARGET> <FLAGS> <OBJECTS> <LINK_FLAGS> <LINK_LIBRARIES>")
set(CMAKE_Swift_CREATE_SHARED_LIBRARY "<CMAKE_Swift_COMPILER> -num-threads ${SwiftStdlib_NUM_LINK_JOBS} -emit-library <CMAKE_SHARED_LIBRARY_Swift_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
else()
set(CMAKE_Swift_CREATE_SHARED_LIBRARY "<CMAKE_Swift_COMPILER> -wmo -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-library -o <TARGET> -module-name <SWIFT_MODULE_NAME> -module-link-name <SWIFT_LIBRARY_NAME> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} <LINK_LIBRARIES>")

set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -wmo -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-executable -o <TARGET> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")

set(CMAKE_Swift_CREATE_STATIC_LIBRARY "<CMAKE_Swift_COMPILER> -wmo -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-library -static -o <TARGET> -module-name <SWIFT_MODULE_NAME> -module-link-name <SWIFT_LIBRARY_NAME> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")

set(CMAKE_Swift_ARCHIVE_CREATE "<CMAKE_AR> crs <TARGET> <OBJECTS>")
set(CMAKE_Swift_ARCHIVE_FINISH "")
endif()
56 changes: 56 additions & 0 deletions Runtimes/Core/cmake/modules/CompilerSettings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
include(CheckSourceCompiles)
include(CheckCompilerFlag)

# Use C+17
set(SwiftCore_MIN_CXX_STANDARD 17)
# Unset CMAKE_CXX_STANDARD if it's too low and in the CMakeCache.txt
if($CACHE{CMAKE_CXX_STANDARD} AND $CACHE{CMAKE_CXX_STANDARD} LESS ${SwiftCore_MIN_CXX_STANDARD})
message(WARNING "Resetting cache value for CMAKE_CXX_STANDARD to ${SwiftCore_MIN_CXX_STANDARD}")
unset(CMAKE_CXX_STANDARD CACHE)
endif()

# Allow manually specified CMAKE_CXX_STANDARD if it's greater than the minimum
# required C++ version
if(DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD LESS ${SwiftCore_MIN_CXX_STANDARD})
message(FATAL_ERROR "Requested CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} which is less than the minimum C++ standard ${SwiftCore_MIN_CXX_STANDARD}")
endif()

set(CMAKE_CXX_STANDARD ${SwiftCore_MIN_CXX_STANDARD} CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)

check_source_compiles(CXX
"#if !(__has_attribute(swiftcall) && \
__has_attribute(swift_context) && \
__has_attribute(swift_error_result) && \
__has_attribute(swift_indirect_result))
#error CXX compiler must support Swift calling conventions
#endif
int main(void) { return 0; }"
HAVE_SWIFTCALL)

if(NOT HAVE_SWIFTCALL)
message(SEND_ERROR "CXX Compiler must support Swift calling conventions")
endif()

check_source_compiles(CXX
"#if !(__has_attribute(swiftasynccall) && \
__has_attribute(swift_async_context))
#error CXX compiler must support Swift async calling conventions
#endif
int main(void) { return 0; }"
HAVE_SWIFT_ASYNC_CALL)

if(NOT HAVE_SWIFT_ASYNC_CALL)
message(SEND_ERROR "CXX Compiler must support Swift async calling conventions")
endif()

check_compiler_flag(Swift "-color-diagnostics" HAVE_SWIFT_COLOR_DIAGNOSTICS)
if(HAVE_SWIFT_COLOR_DIAGNOSTICS)
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-color-diagnostics>)
endif()

check_compiler_flag(Swift "-diagnostic-style swift" HAVE_SWIFT_DIAGNOSTIC_STYLE)
if(HAVE_SWIFT_DIAGNOSTIC_STYLE)
add_compile_options($<$<COMPILE_LANGUAGE:Swift>:-diagnostic-style$<SEMICOLON>swift>)
endif()
31 changes: 31 additions & 0 deletions Runtimes/Core/cmake/modules/DefaultSettings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is designed to setup reasonable defaults for the various settings so
# that configuring a build for a given platform is likely to build
# out-of-the-box without customization. This does not mean that it is the only
# way that will work, or that it represents a shipping configuration.

set(SwiftCore_ENABLE_BACKTRACING_default OFF) # TODO: enable this by default
set(SwiftCore_ENABLE_COMMANDLINE_SUPPORT_default OFF) # TODO: enable this by default

set(SwiftCore_ENABLE_TYPE_PRINTING_default ON)

set(SwiftCore_BACKTRACER_PATH_default "")

macro(defaulted_option variable helptext)
if(NOT DEFINED ${variable}_default)
set(${variable}_default OFF)
endif()
option(${variable} ${helptext} ${${variable}_default})
endmacro()

if(APPLE)
set(SwiftCore_ENABLE_LIBRARY_EVOLUTION_default ON)
set(SwiftCore_ENABLE_CRASH_REPORTER_CLIENT_default ON)
set(SwiftCore_ENABLE_OBJC_INTEROP_default ON)
set(SwiftCore_ENABLE_REFLECTION_default ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "WASM")
set(SwiftCore_OBJECT_FORMAT_default "elf")
elseif(LINUX)
set(SwiftCore_OBJECT_FORMAT_default "elf")
elseif(WIN32)
set(SwiftCore_OBJECT_FORMAT_default "coff")
endif()
Loading