aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Horodniceanu <a.horodniceanu@proton.me>2024-09-12 20:45:09 +0300
committerAndrei Horodniceanu <a.horodniceanu@proton.me>2024-09-12 22:09:12 +0300
commit68dacc91c61f921f1561db7bd7be340ef203beaf (patch)
tree622f2e46e36b2d739e6de03bb84ed4c51c36d6f6 /dev-lang
parentdev-lang/ldc2: 1.36.0-r2 use external patches (diff)
downloaddlang-68dacc91c61f921f1561db7bd7be340ef203beaf.tar.gz
dlang-68dacc91c61f921f1561db7bd7be340ef203beaf.tar.bz2
dlang-68dacc91c61f921f1561db7bd7be340ef203beaf.zip
dev-lang/ldc2/files: remove unused patches
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ldc2/files/ldc2-1.36.0-disable-compiler-rt-sanitizers-tests.patch56
-rw-r--r--dev-lang/ldc2/files/ldc2-1.36.0-fix-phobos-OS-dependent-test-string.patch26
-rw-r--r--dev-lang/ldc2/files/ldc2-1.36.0-lit-cfg-disable-gdb.patch13
-rw-r--r--dev-lang/ldc2/files/ldc2-1.36.0-tests-dshell-remove--m-switch.patch13
-rw-r--r--dev-lang/ldc2/files/ldc2-cmake-autodetect-and-compiler-rt-fixes-pr-4659.patch585
-rw-r--r--dev-lang/ldc2/files/ldc2-remove-dmd-common-int128-unittest.patch17
-rw-r--r--dev-lang/ldc2/files/ldc2-x86-mangling-test-fix-pr-4661.patch55
-rw-r--r--dev-lang/ldc2/files/ldc2-x86-tests-avoid-calling-amd64-gcc-pr-4662.patch39
8 files changed, 0 insertions, 804 deletions
diff --git a/dev-lang/ldc2/files/ldc2-1.36.0-disable-compiler-rt-sanitizers-tests.patch b/dev-lang/ldc2/files/ldc2-1.36.0-disable-compiler-rt-sanitizers-tests.patch
deleted file mode 100644
index e086e2d..0000000
--- a/dev-lang/ldc2/files/ldc2-1.36.0-disable-compiler-rt-sanitizers-tests.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff --git a/tests/PGO/lit.local.cfg b/tests/PGO/lit.local.cfg
-index 9638e26..4578f1a 100644
---- a/tests/PGO/lit.local.cfg
-+++ b/tests/PGO/lit.local.cfg
-@@ -1,2 +1,2 @@
- # Add "PGO_RT" feature, assuming the `profile` compiler-rt library is available
--config.available_features.add('PGO_RT')
-+#config.available_features.add('PGO_RT')
-diff --git a/tests/instrument/lit.local.cfg b/tests/instrument/lit.local.cfg
-index 9366e7b..5030a1e 100644
---- a/tests/instrument/lit.local.cfg
-+++ b/tests/instrument/lit.local.cfg
-@@ -2,4 +2,5 @@ import platform
-
- # Add "XRay_RT" feature on non-Windows, assuming the compiler-rt libraries are available
- if (platform.system() != 'Windows'):
-- config.available_features.add('XRay_RT')
-+ #config.available_features.add('XRay_RT')
-+ pass
-diff --git a/tests/sanitizers/lit.local.cfg b/tests/sanitizers/lit.local.cfg
-index ce12558..6bd5021 100644
---- a/tests/sanitizers/lit.local.cfg
-+++ b/tests/sanitizers/lit.local.cfg
-@@ -4,24 +4,27 @@ import platform
- sys = platform.system()
-
- # Add "LSan" feature, assuming the compiler-rt library is available
--config.available_features.add('LSan')
-+#config.available_features.add('LSan')
-
- # FreeBSD TSan doesn't seem to work,
- # Linux TSan currently only works with static druntime,
- # and there's no Windows TSan (yet?).
- if (sys != 'FreeBSD') and (sys != 'Windows') and not (sys == 'Linux' and config.shared_rt_libs_only):
-- config.available_features.add('TSan')
-+ #config.available_features.add('TSan')
-+ pass
-
- # FreeBSD ASan and MSan don't cope well with ASLR (might do with FreeBSD 14 according to https://github.com/llvm/llvm-project/pull/73439)
- if sys != 'FreeBSD':
-- config.available_features.add('ASan')
-+ #config.available_features.add('ASan')
-+ pass
-
- # MSan is supported on Linux, FreeBSD (modulo ASLR issue), and OpenBSD: https://clang.llvm.org/docs/MemorySanitizer.html#supported-platforms
- if (sys == 'Linux') or (sys == 'OpenBSD'):
-- config.available_features.add('MSan')
-+ #config.available_features.add('MSan')
-+ pass
-
- # Add "Fuzzer" feature, assuming the compiler-rt library is available
--config.available_features.add('Fuzzer')
-+#config.available_features.add('Fuzzer')
-
- if 'ASan' in config.available_features:
- # On Darwin, ASan defaults to `abort_on_error=1`, which would make tests run
diff --git a/dev-lang/ldc2/files/ldc2-1.36.0-fix-phobos-OS-dependent-test-string.patch b/dev-lang/ldc2/files/ldc2-1.36.0-fix-phobos-OS-dependent-test-string.patch
deleted file mode 100644
index 5b67c5d..0000000
--- a/dev-lang/ldc2/files/ldc2-1.36.0-fix-phobos-OS-dependent-test-string.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/runtime/phobos/std/file.d b/runtime/phobos/std/file.d
-index 5b8925d..f1b19b3 100644
---- a/runtime/phobos/std/file.d
-+++ b/runtime/phobos/std/file.d
-@@ -1082,6 +1082,7 @@ private void removeImpl(scope const(char)[] name, scope const(FSChar)* namez) @t
-
- @safe unittest
- {
-+ import std.algorithm.searching : startsWith;
- import std.exception : collectExceptionMsg, assertThrown;
-
- string filename = null; // e.g. as returned by File.tmpfile.name
-@@ -1090,12 +1091,10 @@ private void removeImpl(scope const(char)[] name, scope const(FSChar)* namez) @t
- {
- // exact exception message is OS-dependent
- auto msg = filename.remove.collectExceptionMsg!FileException;
-- assert("Failed to remove file (null): Bad address" == msg, msg);
-+ assert(msg.startsWith("Failed to remove file (null):"), msg);
- }
- else version (Windows)
- {
-- import std.algorithm.searching : startsWith;
--
- // don't test exact message on windows, it's language dependent
- auto msg = filename.remove.collectExceptionMsg!FileException;
- assert(msg.startsWith("(null):"), msg);
diff --git a/dev-lang/ldc2/files/ldc2-1.36.0-lit-cfg-disable-gdb.patch b/dev-lang/ldc2/files/ldc2-1.36.0-lit-cfg-disable-gdb.patch
deleted file mode 100644
index 9809440..0000000
--- a/dev-lang/ldc2/files/ldc2-1.36.0-lit-cfg-disable-gdb.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/lit.site.cfg.in b/tests/lit.site.cfg.in
-index 9b0b9c8..320a6d8 100644
---- a/tests/lit.site.cfg.in
-+++ b/tests/lit.site.cfg.in
-@@ -200,7 +200,7 @@ if (platform.system() == 'Windows') and os.path.isfile( cdb ):
- config.substitutions.append( ('%cdb', '"' + cdb.replace('\\', '\\\\') + '"') )
-
- # Check whether GDB is present
--if (platform.system() != 'Windows') and lit.util.which('gdb', config.environment['PATH']):
-+if False:
- config.available_features.add('gdb')
- gdb_dflags = ''
- command = ['gdb', '--version']
diff --git a/dev-lang/ldc2/files/ldc2-1.36.0-tests-dshell-remove--m-switch.patch b/dev-lang/ldc2/files/ldc2-1.36.0-tests-dshell-remove--m-switch.patch
deleted file mode 100644
index 6c1180c..0000000
--- a/dev-lang/ldc2/files/ldc2-1.36.0-tests-dshell-remove--m-switch.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/dmd/dshell/dll_cxx.d b/tests/dmd/dshell/dll_cxx.d
-index 77393ba331..b39ec0bc6a 100644
---- a/tests/dmd/dshell/dll_cxx.d
-+++ b/tests/dmd/dshell/dll_cxx.d
-@@ -45,7 +45,7 @@ int main()
- }
- else
- {
-- dllCmd ~= [ `-m` ~ Vars.MODEL, `-shared`, `-fPIC`, `-o`, Vars.DLL ];
-+ dllCmd ~= [ `-shared`, `-fPIC`, `-o`, Vars.DLL ];
- mainExtra = `-fPIC -L-L$OUTPUT_BASE -L$DLL -L-lstdc++ -L--no-demangle`;
- if (environment.get("NO_ARCH_VARIANT", "") != "1")
- dllCmd ~= `-m` ~ Vars.MODEL;
diff --git a/dev-lang/ldc2/files/ldc2-cmake-autodetect-and-compiler-rt-fixes-pr-4659.patch b/dev-lang/ldc2/files/ldc2-cmake-autodetect-and-compiler-rt-fixes-pr-4659.patch
deleted file mode 100644
index 7af27a9..0000000
--- a/dev-lang/ldc2/files/ldc2-cmake-autodetect-and-compiler-rt-fixes-pr-4659.patch
+++ /dev/null
@@ -1,585 +0,0 @@
-# A lot of unrelated work in one PR.
-# - It changes some wrong autodetection to lower to amount of stuff being
-# built.
-# - It better supports compiler-rt-sanitizers by handling the way they
-# are installed in Gentoo.
-# - It adds some more fixes for upstream which I didn't take out of the
-# the PR to keep it as is.
-From 58550bbd27e572d1706b04f39132d60c5c2797ac Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Wed, 15 May 2024 18:33:46 +0300
-Subject: [PATCH 1/6] utils/CMakeLists.txt: Fix typo split-filea => split-file
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- utils/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
-index 6b61a068373..379edf2c1b4 100644
---- a/utils/CMakeLists.txt
-+++ b/utils/CMakeLists.txt
-@@ -68,7 +68,7 @@ set_target_properties(
- target_link_libraries(not ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
- endif()
-
--if ((TARGET split-file) OR (EXISTS ${LLVM_ROOT_DIR}/bin/split-filea))
-+if ((TARGET split-file) OR (EXISTS ${LLVM_ROOT_DIR}/bin/split-file))
- # already provided by LLVM
- message(STATUS "Skip building split-file, it is already provided by LLVM")
- else()
-
-From 9b22e4a2b534fe4da54a02aadde486d9cc963574 Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Fri, 17 May 2024 23:12:58 +0300
-Subject: [PATCH 2/6] cmake: Add option to disable bundling ldc-profdata and
- ldc-profgen
-
-Add the configure option LDC_BUNDLE_LLVM_TOOLS that can be used to
-disable packaging ldc-profdata and ldc-profgen. Since the users's llvm
-installation may contain these programs there should be a way to
-specify to ldc not to build them.
-
-Move the definitions for LDCPROF(DATA|GEN)_BIN from tests/ to tools/
-in order to handle this option.
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- tests/CMakeLists.txt | 3 --
- tools/CMakeLists.txt | 81 +++++++++++++++++++++++++-------------------
- 2 files changed, 47 insertions(+), 37 deletions(-)
-
-diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
-index fc988f59560..f428d08b5de 100644
---- a/tests/CMakeLists.txt
-+++ b/tests/CMakeLists.txt
-@@ -1,6 +1,4 @@
- set( LDC2_BIN ${PROJECT_BINARY_DIR}/bin/${LDC_EXE} )
--set( LDCPROFDATA_BIN ${PROJECT_BINARY_DIR}/bin/ldc-profdata )
--set( LDCPROFGEN_BIN ${PROJECT_BINARY_DIR}/bin/ldc-profgen )
- set( LDCPRUNECACHE_BIN ${PROJECT_BINARY_DIR}/bin/${LDCPRUNECACHE_EXE} )
- set( LDCBUILDPLUGIN_BIN ${PROJECT_BINARY_DIR}/bin/${LDC_BUILD_PLUGIN_EXE} )
- set( TIMETRACE2TXT_BIN ${PROJECT_BINARY_DIR}/bin/${TIMETRACE2TXT_EXE} )
-@@ -25,4 +23,3 @@ configure_file(runlit.py runlit.py COPYONLY)
- add_test(NAME lit-tests
- COMMAND ${PYTHON_EXE} runlit.py -v .
- )
--
-diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
-index facb939472d..ab147a9d029 100644
---- a/tools/CMakeLists.txt
-+++ b/tools/CMakeLists.txt
-@@ -1,6 +1,8 @@
- # "tools" are supposed to be packaged with LDC.
- # (in contrast to "utils" which are only used for building / testing)
-
-+option(LDC_BUNDLE_LLVM_TOOLS "Build and install ldc-profgen and ldc-profdata utilities instead of using their llvm counterparts" TRUE)
-+
- #############################################################################
- # Build ldc-prune-cache
- set(LDCPRUNECACHE_EXE ldc-prune-cache)
-@@ -23,47 +25,58 @@ build_d_executable(
- )
- install(PROGRAMS ${LDCPRUNECACHE_EXE_FULL} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
-
--#############################################################################
--# Build ldc-profdata for converting profile data formats (source version depends on LLVM version)
--set(LDCPROFDATA_SRC ldc-profdata/llvm-profdata-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.cpp)
--if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LDCPROFDATA_SRC})
-- add_executable(ldc-profdata ${LDCPROFDATA_SRC})
-- set_target_properties(
-- ldc-profdata PROPERTIES
-+if(LDC_BUNDLE_LLVM_TOOLS)
-+ #############################################################################
-+ # Build ldc-profdata for converting profile data formats (source version depends on LLVM version)
-+ set(LDCPROFDATA_SRC ldc-profdata/llvm-profdata-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.cpp)
-+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LDCPROFDATA_SRC})
-+ add_executable(ldc-profdata ${LDCPROFDATA_SRC})
-+ set_target_properties(
-+ ldc-profdata PROPERTIES
-+ RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin
-+ COMPILE_FLAGS "${LLVM_CXXFLAGS} ${LDC_CXXFLAGS}"
-+ LINK_FLAGS "${SANITIZE_LDFLAGS}"
-+ )
-+ target_link_libraries(ldc-profdata ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
-+ install(TARGETS ldc-profdata DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
-+
-+ # Set path to executable, used by the lit testsuite.
-+ set(LDCPROFDATA_BIN ${PROJECT_BINARY_DIR}/bin/ldc-profdata PARENT_SCOPE)
-+ else()
-+ message(WARNING "ldc-profdata source (${LDCPROFDATA_SRC}) not found")
-+ endif()
-+
-+ #############################################################################
-+ # Build ldc-profgen utility that generates a profile data file from given perf script
-+ # data files for sample-based profile guided optimization (-fprofile-sample-use).
-+ # https://llvm.org/docs/CommandGuide/llvm-profgen.html
-+ # The source in ldc-profgen/ldc-profgen-xx.x is an unmodified copy of llvm's llvm-profgen source dir.
-+ if(LDC_LLVM_VER GREATER_EQUAL 1400)
-+ macro(add_llvm_tool llvm_name)
-+ string(REPLACE "llvm-" "ldc-" ldc_name ${llvm_name})
-+ message(STATUS "Configuring ${ldc_name} build target")
-+ add_executable(${ldc_name} ${ARGN})
-+ set_target_properties(
-+ ${ldc_name} PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin
- COMPILE_FLAGS "${LLVM_CXXFLAGS} ${LDC_CXXFLAGS}"
- LINK_FLAGS "${SANITIZE_LDFLAGS}"
-- )
-- target_link_libraries(ldc-profdata ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
-- install(TARGETS ldc-profdata DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
--else()
-- message(WARNING "ldc-profdata source (${LDCPROFDATA_SRC}) not found")
--endif()
--
--#############################################################################
--# Build ldc-profgen utility that generates a profile data file from given perf script
--# data files for sample-based profile guided optimization (-fprofile-sample-use).
--# https://llvm.org/docs/CommandGuide/llvm-profgen.html
--# The source in ldc-profgen/ldc-profgen-xx.x is an unmodified copy of llvm's llvm-profgen source dir.
--if(LDC_LLVM_VER GREATER_EQUAL 1400)
-- macro(add_llvm_tool llvm_name)
-- string(REPLACE "llvm-" "ldc-" ldc_name ${llvm_name})
-- message(STATUS "Configuring ${ldc_name} build target")
-- add_executable(${ldc_name} ${ARGN})
-- set_target_properties(
-- ${ldc_name} PROPERTIES
-- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin
-- COMPILE_FLAGS "${LLVM_CXXFLAGS} ${LDC_CXXFLAGS}"
-- LINK_FLAGS "${SANITIZE_LDFLAGS}"
-- )
-- target_link_libraries(${ldc_name} ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
-- install(TARGETS ${ldc_name} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
-+ )
-+ target_link_libraries(${ldc_name} ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
-+ install(TARGETS ${ldc_name} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
- endmacro()
- if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ldc-profgen/ldc-profgen-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})
-- add_subdirectory(ldc-profgen/ldc-profgen-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})
-+ add_subdirectory(ldc-profgen/ldc-profgen-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})
-+ # Set path to executable, potentially to be used by the lit tests in the future
-+ set(LDCPROFGEN_BIN ${PROJECT_BINARY_DIR}/bin/ldc-profgen PARENT_SCOPE)
- else()
-- message(WARNING "ldc-profgen source not found (${CMAKE_CURRENT_SOURCE_DIR}/ldc-profgen/ldc-profgen-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})")
-+ message(WARNING "ldc-profgen source not found (${CMAKE_CURRENT_SOURCE_DIR}/ldc-profgen/ldc-profgen-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})")
- endif()
-+ endif()
-+else()
-+ message(STATUS "Using llvm provided llvm-profdata and llvm-profgen")
-+ set(LDCPROFDATA_BIN ${LLVM_ROOT_DIR}/bin/llvm-profdata PARENT_SCOPE)
-+ set(LDCPROFGEN_BIN ${LLVM_ROOT_DIR}/bin/llvm-profgen PARENT_SCOPE)
- endif()
-
- #############################################################################
-
-From ddb6c8763c60261d88498a3a09ea8d62bde18ee6 Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Fri, 17 May 2024 23:19:03 +0300
-Subject: [PATCH 3/6] Support out-of-llvm compiler-rt installations
-
-Currently, the build systems assumes that the compiler-rt libraries
-are under the ${LLVM_LIBRARY_DIRS} directory. This is not always true,
-e.g on Gentoo they are installed in /usr/lib/clang/... This has been
-fixed by adding the COMPILER_RT_BASE_DIR option.
-
-Additionally the code for determining the os-specific compiler-rt
-directory has been slightly refactored and the option
-LDC_INSTALL_LLVM_RUNTIME_LIBS_OS has been renamed to
-COMPILER_RT_LIBDIR_OS since this value can now be used outside of
-LDC_INSTALL_LLVM_RUNTIME_LIBS.
-
-The configuration files (ldc2*.conf) have been modified to optionally
-embed a compiler-rt libdir in case the default search paths would not
-find the libraries.
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- CMakeLists.txt | 107 ++++++++++++++++++++++++++++---------------
- ldc2.conf.in | 2 +-
- ldc2_install.conf.in | 2 +-
- ldc2_phobos.conf.in | 2 +-
- 4 files changed, 72 insertions(+), 41 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b1e41665c07..98bda6d8ce1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -798,9 +798,38 @@ else()
- endif()
-
- #
--# Locate ASan and other LLVM compiler-rt libraries, and copy them to our lib folder
--# Location is LLVM_LIBRARY_DIRS/clang/<version>/lib/<OS>/ , for example LLVM_LIBRARY_DIRS/clang/4.0.0/lib/darwin/
--#
-+# Locate ASan and other LLVM compiler-rt libraries, and copy them to our lib
-+# folder or save that folder in the config files. Location is typically
-+# LLVM_LIBRARY_DIRS/clang/<version>/lib/<OS>/ , for example
-+# LLVM_LIBRARY_DIRS/clang/4.0.0/lib/darwin/ , but we allow the user to specify
-+# another directory.
-+set(COMPILER_RT_BASE_DIR "${LLVM_LIBRARY_DIRS}" CACHE PATH "Base path of compiler-rt libraries. If they in are /usr/lib/clang/17/lib/linux/libclang_rt* you should set this value to /usr/lib")
-+# If it's different than the default it will need to be added to the config files
-+if(COMPILER_RT_BASE_DIR STREQUAL LLVM_LIBRARY_DIRS)
-+ set(WANT_COMPILER_RT_LIBDIR_CONFIG FALSE)
-+else()
-+ set(WANT_COMPILER_RT_LIBDIR_CONFIG TRUE)
-+endif()
-+set(COMPILER_RT_LIBDIR "${COMPILER_RT_BASE_DIR}/clang")
-+if(LDC_LLVM_VER LESS 1600)
-+ set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/${LLVM_VERSION_BASE_STRING}")
-+else()
-+ set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/${LLVM_VERSION_MAJOR}")
-+endif()
-+set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/lib")
-+if(APPLE)
-+ set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/darwin")
-+elseif(UNIX)
-+ if(LDC_LLVM_VER LESS 1500)
-+ set(COMPILER_RT_LIBDIR_OS_DEFAULT "linux")
-+ else()
-+ set(COMPILER_RT_LIBDIR_OS_DEFAULT "x86_64-unknown-linux-gnu")
-+ endif()
-+ set(COMPILER_RT_LIBDIR_OS "${COMPILER_RT_LIBDIR_OS_DEFAULT}" CACHE STRING "Non-Mac Posix: OS used as directory name for the compiler-rt source libraries, e.g., 'freebsd'.")
-+ set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/${COMPILER_RT_LIBDIR_OS}")
-+elseif(WIN32)
-+ set(COMPILER_RT_LIBDIR "${COMPILER_RT_LIBDIR}/windows")
-+endif()
- if(LLVM_IS_SHARED)
- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_DEFAULT OFF)
- else()
-@@ -808,11 +837,7 @@ else()
- endif()
- set(LDC_INSTALL_LLVM_RUNTIME_LIBS ${LDC_INSTALL_LLVM_RUNTIME_LIBS_DEFAULT} CACHE BOOL "Copy/install LLVM compiler-rt libraries (ASan, libFuzzer, ...) from LLVM/Clang into LDC lib dir when available.")
- function(copy_compilerrt_lib llvm_lib_name ldc_lib_name fixup_dylib)
-- if(LDC_LLVM_VER LESS 1600)
-- set(llvm_lib_path ${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_BASE_STRING}/lib/${llvm_lib_name})
-- else()
-- set(llvm_lib_path ${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}/lib/${llvm_lib_name})
-- endif()
-+ set(llvm_lib_path ${COMPILER_RT_LIBDIR}/${llvm_lib_name})
- if(EXISTS ${llvm_lib_path})
- message(STATUS "-- - ${llvm_lib_path} --> ${ldc_lib_name}")
- copy_and_install_llvm_library(${llvm_lib_path} ${ldc_lib_name} ${fixup_dylib})
-@@ -824,57 +849,63 @@ message(STATUS "-- Including LLVM compiler-rt libraries (LDC_INSTALL_LLVM_RUNTIM
- if (LDC_INSTALL_LLVM_RUNTIME_LIBS)
- # Locate LLVM sanitizer runtime libraries, and copy them to our lib folder
-
-+ # No need to add another libdir, the default ldc one will have the libraries
-+ set(WANT_COMPILER_RT_LIBDIR_CONFIG FALSE)
-+
- if(APPLE)
-- copy_compilerrt_lib("darwin/libclang_rt.asan_osx_dynamic.dylib" "libldc_rt.asan.dylib" TRUE)
-- copy_compilerrt_lib("darwin/libclang_rt.lsan_osx_dynamic.dylib" "libldc_rt.lsan.dylib" TRUE)
-- copy_compilerrt_lib("darwin/libclang_rt.tsan_osx_dynamic.dylib" "libldc_rt.tsan.dylib" TRUE)
-- copy_compilerrt_lib("darwin/libclang_rt.osx.a" "libldc_rt.builtins.a" FALSE)
-- copy_compilerrt_lib("darwin/libclang_rt.profile_osx.a" "libldc_rt.profile.a" FALSE)
-- copy_compilerrt_lib("darwin/libclang_rt.fuzzer_osx.a" "libldc_rt.fuzzer.a" FALSE)
-- copy_compilerrt_lib("darwin/libclang_rt.xray_osx.a" "libldc_rt.xray.a" FALSE)
-- copy_compilerrt_lib("darwin/libclang_rt.xray-basic_osx.a" "libldc_rt.xray-basic.a" FALSE)
-- copy_compilerrt_lib("darwin/libclang_rt.xray-fdr_osx.a" "libldc_rt.xray-fdr.a" FALSE)
-- copy_compilerrt_lib("darwin/libclang_rt.xray-profiling_osx.a" "libldc_rt.xray-profiling.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.asan_osx_dynamic.dylib" "libldc_rt.asan.dylib" TRUE)
-+ copy_compilerrt_lib("libclang_rt.lsan_osx_dynamic.dylib" "libldc_rt.lsan.dylib" TRUE)
-+ copy_compilerrt_lib("libclang_rt.tsan_osx_dynamic.dylib" "libldc_rt.tsan.dylib" TRUE)
-+ copy_compilerrt_lib("libclang_rt.osx.a" "libldc_rt.builtins.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.profile_osx.a" "libldc_rt.profile.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.fuzzer_osx.a" "libldc_rt.fuzzer.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray_osx.a" "libldc_rt.xray.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray-basic_osx.a" "libldc_rt.xray-basic.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray-fdr_osx.a" "libldc_rt.xray-fdr.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray-profiling_osx.a" "libldc_rt.xray-profiling.a" FALSE)
- elseif(UNIX)
- if(LDC_LLVM_VER LESS 1500)
-- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_OS_DEFAULT "linux")
- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH_DEFAULT "x86_64")
- else()
-- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_OS_DEFAULT "x86_64-unknown-linux-gnu")
- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH_DEFAULT "")
- endif()
-- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_OS "${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS_DEFAULT}" CACHE STRING "Non-Mac Posix: OS used as directory name for the compiler-rt source libraries, e.g., 'freebsd'.")
-- set(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH "${LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH_DEFAULT}" CACHE STRING "Non-Mac Posix: architecture used as libname suffix for the compiler-rt source libraries, e.g., 'aarch64'.")
-+ set(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH "${LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH_DEFAULT}" CACHE STRING
-+ "Non-Mac Posix: architecture used as libname suffix for the compiler-rt source libraries, e.g., 'aarch64'.")
- if(LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH STREQUAL "")
- set(compilerrt_suffix "")
- else()
- set(compilerrt_suffix "-${LDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH}")
- endif()
-
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.asan${compilerrt_suffix}.a" "libldc_rt.asan.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.lsan${compilerrt_suffix}.a" "libldc_rt.lsan.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.msan${compilerrt_suffix}.a" "libldc_rt.msan.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.tsan${compilerrt_suffix}.a" "libldc_rt.tsan.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.builtins${compilerrt_suffix}.a" "libldc_rt.builtins.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.profile${compilerrt_suffix}.a" "libldc_rt.profile.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.xray${compilerrt_suffix}.a" "libldc_rt.xray.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.fuzzer${compilerrt_suffix}.a" "libldc_rt.fuzzer.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.xray-basic${compilerrt_suffix}.a" "libldc_rt.xray-basic.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.xray-fdr${compilerrt_suffix}.a" "libldc_rt.xray-fdr.a" FALSE)
-- copy_compilerrt_lib("${LDC_INSTALL_LLVM_RUNTIME_LIBS_OS}/libclang_rt.xray-profiling${compilerrt_suffix}.a" "libldc_rt.xray-profiling.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.asan${compilerrt_suffix}.a" "libldc_rt.asan.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.lsan${compilerrt_suffix}.a" "libldc_rt.lsan.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.msan${compilerrt_suffix}.a" "libldc_rt.msan.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.tsan${compilerrt_suffix}.a" "libldc_rt.tsan.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.builtins${compilerrt_suffix}.a" "libldc_rt.builtins.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.profile${compilerrt_suffix}.a" "libldc_rt.profile.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray${compilerrt_suffix}.a" "libldc_rt.xray.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.fuzzer${compilerrt_suffix}.a" "libldc_rt.fuzzer.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray-basic${compilerrt_suffix}.a" "libldc_rt.xray-basic.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray-fdr${compilerrt_suffix}.a" "libldc_rt.xray-fdr.a" FALSE)
-+ copy_compilerrt_lib("libclang_rt.xray-profiling${compilerrt_suffix}.a" "libldc_rt.xray-profiling.a" FALSE)
- elseif(WIN32)
- set(compilerrt_arch_suffix "x86_64")
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- set(compilerrt_arch_suffix "i386")
- endif()
-- copy_compilerrt_lib("windows/clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
-- copy_compilerrt_lib("windows/clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE)
-- copy_compilerrt_lib("windows/clang_rt.builtins-${compilerrt_arch_suffix}.lib" "ldc_rt.builtins.lib" FALSE)
-- copy_compilerrt_lib("windows/clang_rt.profile-${compilerrt_arch_suffix}.lib" "ldc_rt.profile.lib" FALSE)
-- copy_compilerrt_lib("windows/clang_rt.fuzzer-${compilerrt_arch_suffix}.lib" "ldc_rt.fuzzer.lib" FALSE)
-+ copy_compilerrt_lib("clang_rt.asan-${compilerrt_arch_suffix}.lib" "ldc_rt.asan.lib" FALSE)
-+ copy_compilerrt_lib("clang_rt.lsan-${compilerrt_arch_suffix}.lib" "ldc_rt.lsan.lib" FALSE)
-+ copy_compilerrt_lib("clang_rt.builtins-${compilerrt_arch_suffix}.lib" "ldc_rt.builtins.lib" FALSE)
-+ copy_compilerrt_lib("clang_rt.profile-${compilerrt_arch_suffix}.lib" "ldc_rt.profile.lib" FALSE)
-+ copy_compilerrt_lib("clang_rt.fuzzer-${compilerrt_arch_suffix}.lib" "ldc_rt.fuzzer.lib" FALSE)
- endif()
- endif()
-
-+if(WANT_COMPILER_RT_LIBDIR_CONFIG)
-+ message(STATUS "Adding ${COMPILER_RT_LIBDIR} to libdir in configuration files")
-+ set(OPTIONAL_COMPILER_RT_DIR "\n \"${COMPILER_RT_LIBDIR}\",")
-+endif()
-+
- #
- # Auxiliary build and test utils.
- #
-diff --git a/ldc2.conf.in b/ldc2.conf.in
-index 1ec4ce854c4..0ef4caa07a2 100644
---- a/ldc2.conf.in
-+++ b/ldc2.conf.in
-@@ -28,7 +28,7 @@ default:
- ];
- // default directories to be searched for libraries when linking
- lib-dirs = [
-- "@CMAKE_BINARY_DIR@/lib@LIB_SUFFIX@",
-+ "@CMAKE_BINARY_DIR@/lib@LIB_SUFFIX@",@OPTIONAL_COMPILER_RT_DIR@
- ];
- // default rpath when linking against the shared default libs
- rpath = "@SHARED_LIBS_RPATH@";
-diff --git a/ldc2_install.conf.in b/ldc2_install.conf.in
-index 7536f8f0d4f..f8afa42613c 100644
---- a/ldc2_install.conf.in
-+++ b/ldc2_install.conf.in
-@@ -26,7 +26,7 @@ default:
- ];
- // default directories to be searched for libraries when linking
- lib-dirs = [
-- "@CMAKE_INSTALL_LIBDIR@",
-+ "@CMAKE_INSTALL_LIBDIR@",@OPTIONAL_COMPILER_RT_DIR@
- ];
- // default rpath when linking against the shared default libs
- rpath = "@SHARED_LIBS_INSTALL_RPATH@";
-diff --git a/ldc2_phobos.conf.in b/ldc2_phobos.conf.in
-index 9bc5b1aa484..f2c00634f16 100644
---- a/ldc2_phobos.conf.in
-+++ b/ldc2_phobos.conf.in
-@@ -29,7 +29,7 @@ default:
- ];
- // default directories to be searched for libraries when linking
- lib-dirs = [
-- "@CMAKE_BINARY_DIR@/lib@LIB_SUFFIX@",
-+ "@CMAKE_BINARY_DIR@/lib@LIB_SUFFIX@",@OPTIONAL_COMPILER_RT_DIR@
- ];
- // default rpath when linking against the shared default libs
- rpath = "@SHARED_LIBS_RPATH@";
-
-From 25d3243a35761bd520a31732913923c366fdfa1a Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Sat, 18 May 2024 00:58:03 +0300
-Subject: [PATCH 4/6] tests/CMakeLists.txt: Add option for controlling
- compiler-rt tests
-
-https://github.com/ldc-developers/ldc/pull/4636 and
-https://github.com/ldc-developers/ldc/pull/4638 added some checks when
-deciding if tests that require certain compiler-rt libraries will be
-run. They uses globbing to determine if the library files exist. This
-is insufficient as the compiler-rt libs can be in directories other
-than the ldc2 libdir. Globbing also has the downside of tests being
-silently skipped when the failure to find the libraries should have
-been vocal.
-
-To solve this the TEST_COMPILER_RT_LIBRARIES option has been added to
-control which compiler-rt dependent tests will be run.
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- tests/CMakeLists.txt | 7 +++++++
- tests/PGO/lit.local.cfg | 6 ++----
- tests/instrument/lit.local.cfg | 6 ++----
- tests/lit.site.cfg.in | 1 +
- tests/sanitizers/lit.local.cfg | 15 +++++++--------
- 5 files changed, 19 insertions(+), 16 deletions(-)
-
-diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
-index f428d08b5de..39be385f5d6 100644
---- a/tests/CMakeLists.txt
-+++ b/tests/CMakeLists.txt
-@@ -11,6 +11,13 @@ if(WIN32)
- set(PYTHON_EXE python)
- endif()
-
-+set(TEST_COMPILER_RT_LIBRARIES "all" CACHE STRING "List of compiler-rt libraries to test, separated by ';'. Can be set to 'all' and 'none'")
-+if(TEST_COMPILER_RT_LIBRARIES STREQUAL "all")
-+ set(TEST_COMPILER_RT_LIBRARIES "profile;xray;lsan;tsan;asan;msan;fuzzer")
-+elseif(TEST_COMPILER_RT_LIBRARIES STREQUAL "none")
-+ set(TEST_COMPILER_RT_LIBRARIES "")
-+endif()
-+
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set( DEFAULT_TARGET_BITS 64 )
- else()
-diff --git a/tests/PGO/lit.local.cfg b/tests/PGO/lit.local.cfg
-index d63318065a8..466a9bad6da 100644
---- a/tests/PGO/lit.local.cfg
-+++ b/tests/PGO/lit.local.cfg
-@@ -1,5 +1,3 @@
--from glob import glob
--
--# Add "PGO_RT" feature, if the `profile` compiler-rt library is available
--if glob(os.path.join(config.ldc2_lib_dir, "*profile*")):
-+# Add "PGO_RT" feature
-+if 'profile' in config.enabled_rt_libs:
- config.available_features.add('PGO_RT')
-diff --git a/tests/instrument/lit.local.cfg b/tests/instrument/lit.local.cfg
-index e97afbfa4bc..71968d9cd78 100644
---- a/tests/instrument/lit.local.cfg
-+++ b/tests/instrument/lit.local.cfg
-@@ -1,7 +1,5 @@
- import platform
--from glob import glob
--
--# Add "XRay_RT" feature on non-Windows, if the compiler-rt libraries are available
-+# Add "XRay_RT" feature on non-Windows
- if (platform.system() != 'Windows'):
-- if glob(os.path.join(config.ldc2_lib_dir, "*xray*")):
-+ if 'xray' in config.enabled_rt_libs:
- config.available_features.add('XRay_RT')
-diff --git a/tests/lit.site.cfg.in b/tests/lit.site.cfg.in
-index 1e966a78805..4aa1a8294cc 100644
---- a/tests/lit.site.cfg.in
-+++ b/tests/lit.site.cfg.in
-@@ -37,6 +37,7 @@ config.ldc_host_arch = "@LLVM_NATIVE_ARCH@"
- config.ldc_with_lld = @LDC_WITH_LLD@
- config.spirv_enabled = @LLVM_SPIRV_FOUND@
- config.rt_supports_sanitizers = @RT_SUPPORT_SANITIZERS@
-+config.enabled_rt_libs = set("@TEST_COMPILER_RT_LIBRARIES@".split(';'))
- config.shared_rt_libs_only = "@BUILD_SHARED_LIBS@" == "ON"
-
- config.name = 'LDC'
-diff --git a/tests/sanitizers/lit.local.cfg b/tests/sanitizers/lit.local.cfg
-index 82e35e28dd0..bdac8304b84 100644
---- a/tests/sanitizers/lit.local.cfg
-+++ b/tests/sanitizers/lit.local.cfg
-@@ -1,32 +1,31 @@
- import os
- import platform
--from glob import glob
-
- sys = platform.system()
-
--# Add "LSan" feature, if the compiler-rt library is available
--if glob(os.path.join(config.ldc2_lib_dir, "*lsan*")):
-+# Add "LSan" feature
-+if 'lsan' in config.enabled_rt_libs:
- config.available_features.add('LSan')
-
- # FreeBSD TSan doesn't seem to work,
- # Linux TSan currently only works with static druntime,
- # and there's no Windows TSan (yet?).
- if (sys != 'FreeBSD') and (sys != 'Windows') and not (sys == 'Linux' and config.shared_rt_libs_only):
-- if glob(os.path.join(config.ldc2_lib_dir, "*tsan*")):
-+ if 'tsan' in config.enabled_rt_libs:
- config.available_features.add('TSan')
-
- # FreeBSD ASan and MSan don't cope well with ASLR (might do with FreeBSD 14 according to https://github.com/llvm/llvm-project/pull/73439)
- if sys != 'FreeBSD':
-- if glob(os.path.join(config.ldc2_lib_dir, "*asan*")):
-+ if 'asan' in config.enabled_rt_libs:
- config.available_features.add('ASan')
-
- # MSan is supported on Linux, FreeBSD (modulo ASLR issue), and OpenBSD: https://clang.llvm.org/docs/MemorySanitizer.html#supported-platforms
- if (sys == 'Linux') or (sys == 'OpenBSD'):
-- if glob(os.path.join(config.ldc2_lib_dir, "*msan*")):
-+ if 'msan' in config.enabled_rt_libs:
- config.available_features.add('MSan')
-
--# Add "Fuzzer" feature, assuming the compiler-rt library is available
--if glob(os.path.join(config.ldc2_lib_dir, "*fuzzer*")):
-+# Add "Fuzzer" feature
-+if 'fuzzer' in config.enabled_rt_libs:
- config.available_features.add('Fuzzer')
-
- if 'ASan' in config.available_features:
-
-From 46e41aebfec7d5657a9824e05acaa97f87bafa58 Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Sat, 18 May 2024 04:25:28 +0300
-Subject: [PATCH 5/6] utils/CMakeLists.txt: Build split-file if llvm is too old
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- utils/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
-index 379edf2c1b4..abb6312f5b7 100644
---- a/utils/CMakeLists.txt
-+++ b/utils/CMakeLists.txt
-@@ -68,7 +68,7 @@ set_target_properties(
- target_link_libraries(not ${LLVM_LIBRARIES} ${CMAKE_DL_LIBS} ${LLVM_LDFLAGS})
- endif()
-
--if ((TARGET split-file) OR (EXISTS ${LLVM_ROOT_DIR}/bin/split-file))
-+if ((TARGET split-file) OR (EXISTS ${LLVM_ROOT_DIR}/bin/split-file AND ${LLVM_VERSION_MAJOR} GREATER_EQUAL 14))
- # already provided by LLVM
- message(STATUS "Skip building split-file, it is already provided by LLVM")
- else()
-
-From cff48ff2b462f2fe4004e6f2dea29744f8b5fa26 Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Sat, 18 May 2024 04:27:33 +0300
-Subject: [PATCH 6/6] ci: rename LDC_INSTALL_LLVM_RUNTIME_LIBS_OS to
- COMPILER_RT_LIBDIR_OS
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- .cirrus.yml | 2 +-
- .github/workflows/main.yml | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/.cirrus.yml b/.cirrus.yml
-index c2263856d93..4b4d0689c51 100644
---- a/.cirrus.yml
-+++ b/.cirrus.yml
-@@ -248,7 +248,7 @@ task:
- -DEXTRA_CXXFLAGS=-flto=full
- -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++
- -DJITRT_EXTRA_LDFLAGS=-static-libstdc++
-- -DLDC_INSTALL_LLVM_RUNTIME_LIBS_OS=aarch64-unknown-linux-gnu
-+ -DCOMPILER_RT_LIBDIR_OS=aarch64-unknown-linux-gnu
- -DLLVM_ROOT_DIR=$CIRRUS_WORKING_DIR/../llvm
- -DD_COMPILER=$CIRRUS_WORKING_DIR/../bootstrap-ldc/bin/ldmd2
- PARALLELISM: 4
-diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
-index bb2474f1fa3..166f00739f1 100644
---- a/.github/workflows/main.yml
-+++ b/.github/workflows/main.yml
-@@ -188,7 +188,7 @@ jobs:
- arch: aarch64
- android_x86_arch: x86_64
- extra_cmake_flags: >-
-- -DLDC_INSTALL_LLVM_RUNTIME_LIBS_OS=linux
-+ -DCOMPILER_RT_LIBDIR_OS=linux
- -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64-android
-
- name: ${{ matrix.job_name }}
diff --git a/dev-lang/ldc2/files/ldc2-remove-dmd-common-int128-unittest.patch b/dev-lang/ldc2/files/ldc2-remove-dmd-common-int128-unittest.patch
deleted file mode 100644
index bed0a83..0000000
--- a/dev-lang/ldc2/files/ldc2-remove-dmd-common-int128-unittest.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/dmd/common/int128.d b/dmd/common/int128.d
-index 796687b1f7..b020cf92ce 100644
---- a/dmd/common/int128.d
-+++ b/dmd/common/int128.d
-@@ -770,6 +770,7 @@ version (unittest)
- }
- }
-
-+/+
- unittest
- {
- const C0 = Zero;
-@@ -919,3 +920,4 @@ unittest
- assert(rol(C7_9, 1) == rol1(C7_9));
- assert(ror(C7_9, 1) == ror1(C7_9));
- }
-++/
diff --git a/dev-lang/ldc2/files/ldc2-x86-mangling-test-fix-pr-4661.patch b/dev-lang/ldc2/files/ldc2-x86-mangling-test-fix-pr-4661.patch
deleted file mode 100644
index 522021a..0000000
--- a/dev-lang/ldc2/files/ldc2-x86-mangling-test-fix-pr-4661.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 27758f2a20849fe2a6b1c20f44451d1cc58ed232 Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Sat, 18 May 2024 22:40:49 +0300
-Subject: [PATCH] tests/codegen/mangling.d: change argument type of naked_dFunc
- to int
-
-Avoid issues on x86 with the calling convention by having an int
-argument, which can be passed through a register, therefore, lifting
-the burden of cleaning the stack, instead of a double.
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- tests/codegen/inputs/mangling_definitions.d | 6 ++++--
- tests/codegen/mangling.d | 6 +++---
- 2 files changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/tests/codegen/inputs/mangling_definitions.d b/tests/codegen/inputs/mangling_definitions.d
-index 6234999bfc4..a6ed0fec9e8 100644
---- a/tests/codegen/inputs/mangling_definitions.d
-+++ b/tests/codegen/inputs/mangling_definitions.d
-@@ -46,6 +46,8 @@ version(AsmX86)
- else
- static assert(naked_cppFunc.mangleof == "_ZN15cpp_naked_funcs13naked_cppFuncEd");
-
-- int naked_dFunc(double a) { asm { naked; ret; } }
-- static assert(naked_dFunc.mangleof == "_D11definitions11naked_dFuncFdZi");
-+ // Pass an int instead of a double due to x86 calling convetion
-+ // See: https://github.com/ldc-developers/ldc/pull/4661
-+ int naked_dFunc(int a) { asm { naked; ret; } }
-+ static assert(naked_dFunc.mangleof == "_D11definitions11naked_dFuncFiZi");
- }
-diff --git a/tests/codegen/mangling.d b/tests/codegen/mangling.d
-index d79793192a6..054d4d79926 100644
---- a/tests/codegen/mangling.d
-+++ b/tests/codegen/mangling.d
-@@ -61,8 +61,8 @@ version(AsmX86)
- extern(C++, decl_cpp_naked_funcs) pragma(mangle, nakedCppFuncMangle)
- int decl_naked_cppFunc(double a);
-
-- pragma(mangle, "_D11definitions11naked_dFuncFdZi")
-- int decl_naked_dFunc(double a);
-+ pragma(mangle, "_D11definitions11naked_dFuncFiZi")
-+ int decl_naked_dFunc(int a);
- }
-
- // Interfacing with C via pragma(mangle, …), without having to take care
-@@ -84,7 +84,7 @@ void main()
- {
- decl_naked_cFunc(1.0);
- decl_naked_cppFunc(2.0);
-- decl_naked_dFunc(3.0);
-+ decl_naked_dFunc(3);
- }
-
- assert(decl_cos(0.0) == 1.0);
diff --git a/dev-lang/ldc2/files/ldc2-x86-tests-avoid-calling-amd64-gcc-pr-4662.patch b/dev-lang/ldc2/files/ldc2-x86-tests-avoid-calling-amd64-gcc-pr-4662.patch
deleted file mode 100644
index 252d8f1..0000000
--- a/dev-lang/ldc2/files/ldc2-x86-tests-avoid-calling-amd64-gcc-pr-4662.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 4b4da9f718f590301fb39f6c2acb109caa801acb Mon Sep 17 00:00:00 2001
-From: Andrei Horodniceanu <a.horodniceanu@proton.me>
-Date: Sun, 19 May 2024 02:06:22 +0300
-Subject: [PATCH] tests/codegen/casm.c: Move to casm.i
-
-Don't call the C preprocessor as it may fail in a cross-compilation
-environment. Drop the `-mtriple` argument and let the test run on all
-platforms.
-
-Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
----
- tests/codegen/casm.c | 6 ------
- tests/codegen/casm.i | 4 ++++
- 2 files changed, 4 insertions(+), 6 deletions(-)
- delete mode 100644 tests/codegen/casm.c
- create mode 100644 tests/codegen/casm.i
-
-diff --git a/tests/codegen/casm.c b/tests/codegen/casm.c
-deleted file mode 100644
-index 5a34f6d00b0..00000000000
---- a/tests/codegen/casm.c
-+++ /dev/null
-@@ -1,6 +0,0 @@
--// REQUIRES: target_X86
--// UNSUPPORTED: Windows
--// RUN: %ldc -mtriple=x86_64-freebsd13 -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
--
--// CHECK: module asm ".symver __qsort_r_compat, qsort_r@FBSD_1.0"
--__asm__(".symver " "__qsort_r_compat" ", " "qsort_r" "@" "FBSD_1.0");
-diff --git a/tests/codegen/casm.i b/tests/codegen/casm.i
-new file mode 100644
-index 00000000000..33b0be8ee73
---- /dev/null
-+++ b/tests/codegen/casm.i
-@@ -0,0 +1,4 @@
-+// RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
-+
-+// CHECK: module asm ".symver __qsort_r_compat, qsort_r@FBSD_1.0"
-+asm(".symver " "__qsort_r_compat" ", " "qsort_r" "@" "FBSD_1.0");