dev-lang/swift: fix swift-5.10.1 linker error on compiling IndexStore

Closes: https://bugs.gentoo.org/950708
Signed-off-by: Itai Ferber <itai@itaiferber.net>
This commit is contained in:
Itai Ferber
2025-03-07 15:29:56 -05:00
parent 2049118ccc
commit c814bc34f9
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# The following functions are all declared to be explicitly exported from
# IndexStore via IndexStore.exports, but their declarations and implementations
# are guarded by `#if INDEXSTORE_HAS_BLOCKS`, which is `0` on non-Darwin
# platforms. They're not used on non-Darwin platforms, so not exporting them
# avoids a linker failure.
--- a/llvm-project/clang/tools/IndexStore/IndexStore.exports
+++ b/llvm-project/clang/tools/IndexStore/IndexStore.exports
@@ -10,9 +10,7 @@
indexstore_store_dispose
indexstore_store_get_unit_modification_time
indexstore_store_get_unit_name_from_output_path
-indexstore_store_units_apply
indexstore_store_units_apply_f
-indexstore_store_set_unit_event_handler
indexstore_store_set_unit_event_handler_f
indexstore_store_start_unit_event_listening
indexstore_store_stop_unit_event_listening
@@ -33,19 +31,13 @@
indexstore_occurrence_get_symbol
indexstore_occurrence_get_roles
indexstore_occurrence_get_line_col
-indexstore_occurrence_relations_apply
indexstore_occurrence_relations_apply_f
indexstore_record_reader_create
indexstore_record_reader_dispose
-indexstore_record_reader_search_symbols
indexstore_record_reader_search_symbols_f
-indexstore_record_reader_symbols_apply
indexstore_record_reader_symbols_apply_f
-indexstore_record_reader_occurrences_apply
indexstore_record_reader_occurrences_apply_f
-indexstore_record_reader_occurrences_in_line_range_apply
indexstore_record_reader_occurrences_in_line_range_apply_f
-indexstore_record_reader_occurrences_of_symbols_apply
indexstore_record_reader_occurrences_of_symbols_apply_f
indexstore_unit_dependency_get_kind
indexstore_unit_dependency_get_filepath
@@ -68,9 +60,7 @@
indexstore_unit_reader_get_output_file
indexstore_unit_reader_get_sysroot_path
indexstore_unit_reader_get_target
-indexstore_unit_reader_dependencies_apply
indexstore_unit_reader_dependencies_apply_f
-indexstore_unit_reader_includes_apply
indexstore_unit_reader_includes_apply_f
indexstore_unit_reader_has_main_file
indexstore_unit_reader_is_debug_compilation

View File

@@ -52,6 +52,7 @@ SRC_URI="
PATCHES=(
"${FILESDIR}/${PF}/backport-swift-75662.patch"
"${FILESDIR}/${PF}/backtracing-noexecstack.patch"
"${FILESDIR}/${PF}/clang-indexstore-exports.patch"
"${FILESDIR}/${PF}/disable-libdispatch-werror.patch"
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch"