Skip to content

Commit 4273453

Browse files
committed
Fix GCC 16 LTO build failure with multi-target dispatch
Remove always_inline from STDSortComparator. This function is passed to std::sort, and GCC 16 rejects forced inlining when the caller and callee have mismatched target attributes during LTO. This occurs when the library is used via the header-only static include with multiple dispatch targets (e.g. AVX-512 and baseline) linked together, as NumPy does. Standalone builds are unaffected since they use -march=skylake-avx512 for the entire translation unit.
1 parent 14d7480 commit 4273453

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xss-common-comparators.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ struct Comparator {
4040
using opmask_t = typename vtype::opmask_t;
4141
using type_t = typename vtype::type_t;
4242

43-
X86_SIMD_SORT_FINLINE bool STDSortComparator(const type_t &a,
44-
const type_t &b)
43+
X86_SIMD_SORT_INLINE bool STDSortComparator(const type_t &a,
44+
const type_t &b)
4545
{
4646
if constexpr (descend) { return comparison_func<vtype>(b, a); }
4747
else {

0 commit comments

Comments
 (0)