Skip to content

Commit 21ee3a5

Browse files
committed
Drop ICU
update freestanding deps
1 parent ac6c08f commit 21ee3a5

12 files changed

+2
-456
lines changed

Diff for: stdlib/cmake/modules/AddSwiftStdlib.cmake

-5
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,6 @@ function(_add_target_variant_link_flags)
441441
# link against the custom C++ library
442442
swift_android_cxx_libraries_for_arch(${LFLAGS_ARCH} cxx_link_libraries)
443443
list(APPEND link_libraries ${cxx_link_libraries})
444-
445-
# link against the ICU libraries
446-
list(APPEND link_libraries
447-
${SWIFT_ANDROID_${LFLAGS_ARCH}_ICU_I18N}
448-
${SWIFT_ANDROID_${LFLAGS_ARCH}_ICU_UC})
449444
else()
450445
# If lto is enabled, we need to add the object path flag so that the LTO code
451446
# generator leaves the intermediate object file in a place where it will not

Diff for: stdlib/public/SwiftShims/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ set(sources
2020
Target.h
2121
ThreadLocalStorage.h
2222
UnicodeData.h
23-
UnicodeShims.h
2423
Visibility.h
2524
_SwiftConcurrency.h
2625
_SwiftDistributed.h

Diff for: stdlib/public/SwiftShims/UnicodeShims.h

-282
This file was deleted.

Diff for: stdlib/public/SwiftShims/module.modulemap

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ module SwiftShims {
1818
header "System.h"
1919
header "ThreadLocalStorage.h"
2020
header "UnicodeData.h"
21-
header "UnicodeShims.h"
2221
header "Visibility.h"
2322
export *
2423
}

Diff for: stdlib/public/core/CMakeLists.txt

-47
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ set(SWIFTLIB_ESSENTIAL
7878
Hasher.swift
7979
Hashing.swift
8080
HashTable.swift
81-
ICU.swift
8281
Identifiable.swift
8382
Indices.swift
8483
InputStream.swift
@@ -238,29 +237,6 @@ set(swift_core_link_flags "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}")
238237
set(swift_core_framework_depends)
239238
set(swift_core_private_link_libraries)
240239
set(swift_stdlib_compile_flags "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}")
241-
if(SWIFT_PRIMARY_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
242-
list(APPEND swift_core_link_flags "-all_load")
243-
list(APPEND swift_core_private_link_libraries icucore)
244-
else()
245-
# With the GNU linker the equivalent of -all_load is to tell the linker
246-
# --whole-archive before the archive and --no-whole-archive after (without
247-
# the second, it causes errors when the system libraries are told to
248-
# include everything). The best way to get it in there, according to the
249-
# documentation, is to put the flags in the target_link_libraries setting.
250-
251-
# TODO: However, for the moment this actually makes things explode with an
252-
# incomplete runtime. This should be turned back on when more of the porting
253-
# effort has been completed.
254-
#set(LINK_FLAGS
255-
# -Wl,--whole-archive swiftRuntime -Wl,--no-whole-archive)
256-
if("${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "")
257-
list(APPEND swift_core_private_link_libraries
258-
${SWIFT_${SWIFT_PRIMARY_VARIANT_SDK}_${SWIFT_PRIMARY_VARIANT_ARCH}_ICU_UC}
259-
${SWIFT_${SWIFT_PRIMARY_VARIANT_SDK}_${SWIFT_PRIMARY_VARIANT_ARCH}_ICU_I18N})
260-
else()
261-
list(APPEND swift_core_private_link_libraries -licui18nswift -licuucswift -licudataswift)
262-
endif()
263-
endif()
264240

265241
if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL CYGWIN)
266242
# TODO(compnerd) cache this variable to permit re-configuration
@@ -343,29 +319,6 @@ if(${LIBSWIFT_BUILD_MODE} STREQUAL "BOOTSTRAPPING")
343319
set(b0_deps symlink-headers-bootstrapping0)
344320
set(b1_deps symlink-headers-bootstrapping1)
345321

346-
if(SWIFT_PATH_TO_LIBICU_BUILD)
347-
foreach(bootstrapping "0" "1")
348-
# Need to symlink the libicu libraries to be able to run
349-
# the bootstrapping compiler with a custom library path.
350-
get_bootstrapping_path(output_dir
351-
"${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" "${bootstrapping}")
352-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
353-
message("TODO: support for copying ICU libraries on Windows")
354-
endif()
355-
set(target "symlink-icu-bootstrapping${bootstrapping}")
356-
add_custom_target(${target})
357-
add_custom_command(TARGET ${target} POST_BUILD
358-
COMMAND
359-
"${CMAKE_COMMAND}" "-E" "make_directory" "${output_dir}"
360-
COMMAND
361-
"ln" "-s" "-f" "${SWIFT_PATH_TO_LIBICU_BUILD}/lib/libicu*" "."
362-
WORKING_DIRECTORY "${output_dir}"
363-
COMMENT "symlink ICU libraries for bootstrapping stage ${bootstrapping}")
364-
endforeach()
365-
set(b0_deps ${b0_deps} symlink-icu-bootstrapping0)
366-
set(b1_deps ${b1_deps} symlink-icu-bootstrapping1)
367-
endif()
368-
369322
list(FIND SWIFT_STDLIB_LIBRARY_BUILD_TYPES "SHARED" index_of_shared)
370323
if(index_of_shared EQUAL -1)
371324
message(FATAL_ERROR "bootstrapping requires SHARED stdlib build type")

Diff for: stdlib/public/core/GroupInfo.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"CString.swift",
99
"Character.swift",
1010
"CharacterProperties.swift",
11-
"ICU.swift",
1211
"NFC.swift",
1312
"NFD.swift",
1413
"SmallString.swift",

0 commit comments

Comments
 (0)