<commit_before># Re-enable this if you add assembly files to this target again.
# if (XCODE)
#   # Assembly files with Xcode generator require cmake 2.8.10.
#   cmake_minimum_required(VERSION 2.8.10)
#   set(CMAKE_ASM_COMPILER_ID "Clang")
#   enable_language(ASM)
# else ()
#   # FIXME: CMake assembler rules don't pass things 
#   # like architecture flags with the makefile generator.
#   SET_SOURCE_FILES_PROPERTIES(FastEntryPoints.s PROPERTIES LANGUAGE C)
# endif()

if (SWIFT_OPTIMIZED)
  set(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS_DEFAULT OFF)
else()
  set(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS_DEFAULT ON)
endif()

set(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS
  ${SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS_DEFAULT}
  CACHE BOOL "Overwrite memory for deallocated Swift objects")

set(SWIFT_RUNTIME_COMPILE_FLAGS)
if(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS)
  list(APPEND SWIFT_RUNTIME_COMPILE_FLAGS "-DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=1")
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  set(SWIFT_RUNTIME_OBJC_SOURCES
    Availability.mm
    SwiftObject.mm
    NSSwiftXXXBase.mm.gyb
    Reflection.mm)
else()
  set(SWIFT_RUNTIME_OBJC_SOURCES)
  list(APPEND SWIFT_RUNTIME_COMPILE_FLAGS "-fblocks")
endif()

add_swift_library(swiftRuntime
  Casting.cpp
  Demangle.cpp
  HeapObject.cpp
  KnownMetadata.cpp
  Metadata.cpp
  Stubs.cpp
  Enum.cpp
  Once.cpp
  Heap.cpp
  Errors.cpp
  UnicodeExtendedGraphemeClusters.cpp.gyb
  ${SWIFT_RUNTIME_OBJC_SOURCES}
  COMPILE_FLAGS ${SWIFT_RUNTIME_COMPILE_FLAGS}
  TARGET_LIBRARY INSTALL
  FRAMEWORK_DEPENDS Foundation)


list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_OSX_SYSROOT}")
find_library(CRASHREPORTERCLIENT CrashReporterClient ONLY_CMAKE_FIND_ROOT_PATH)

if (CRASHREPORTERCLIENT)
  target_link_libraries(swiftRuntime "-lCrashReporterClient")
  set_target_properties(swiftRuntime 
    PROPERTIES COMPILE_FLAGS "-DSWIFT_HAVE_CRASHREPORTERCLIENT=1")
endif()
<commit_msg>Revert "stdlib: Enable compiling blocks on non-darwin."<commit_after># Re-enable this if you add assembly files to this target again.
# if (XCODE)
#   # Assembly files with Xcode generator require cmake 2.8.10.
#   cmake_minimum_required(VERSION 2.8.10)
#   set(CMAKE_ASM_COMPILER_ID "Clang")
#   enable_language(ASM)
# else ()
#   # FIXME: CMake assembler rules don't pass things 
#   # like architecture flags with the makefile generator.
#   SET_SOURCE_FILES_PROPERTIES(FastEntryPoints.s PROPERTIES LANGUAGE C)
# endif()

if (SWIFT_OPTIMIZED)
  set(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS_DEFAULT OFF)
else()
  set(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS_DEFAULT ON)
endif()

set(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS
  ${SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS_DEFAULT}
  CACHE BOOL "Overwrite memory for deallocated Swift objects")

set(SWIFT_RUNTIME_COMPILE_FLAGS)
if(SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS)
  list(APPEND SWIFT_RUNTIME_COMPILE_FLAGS "-DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=1")
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  set(SWIFT_RUNTIME_OBJC_SOURCES
    Availability.mm
    SwiftObject.mm
    NSSwiftXXXBase.mm.gyb
    Reflection.mm)
else()
  set(SWIFT_RUNTIME_OBJC_SOURCES)
endif()

add_swift_library(swiftRuntime
  Casting.cpp
  Demangle.cpp
  HeapObject.cpp
  KnownMetadata.cpp
  Metadata.cpp
  Stubs.cpp
  Enum.cpp
  Once.cpp
  Heap.cpp
  Errors.cpp
  UnicodeExtendedGraphemeClusters.cpp.gyb
  ${SWIFT_RUNTIME_OBJC_SOURCES}
  COMPILE_FLAGS ${SWIFT_RUNTIME_COMPILE_FLAGS}
  TARGET_LIBRARY INSTALL
  FRAMEWORK_DEPENDS Foundation)


list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_OSX_SYSROOT}")
find_library(CRASHREPORTERCLIENT CrashReporterClient ONLY_CMAKE_FIND_ROOT_PATH)

if (CRASHREPORTERCLIENT)
  target_link_libraries(swiftRuntime "-lCrashReporterClient")
  set_target_properties(swiftRuntime 
    PROPERTIES COMPILE_FLAGS "-DSWIFT_HAVE_CRASHREPORTERCLIENT=1")
endif()

{'fraction_non_alphanumeric': 0.07497360084477296, 'fraction_numerical': 0.005279831045406547, 'mean_word_length': 6.328820116054159, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3804160', 'n_tokens_mistral': 1541, 'n_tokens_neox': 1453, 'n_words': 241}