From f98967b0d262f5cf93f635565a6da8459c48eeac Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 27 Oct 2026 05:19:23 +0900 Subject: [PATCH 1/2] marzer.tomlplusplus: the module unit builds toml++ without its SSE2 path (revision 2) defines its intrinsics static inline. Under the MSVC ABI clang gives such a function the same mangled name in every module whose global module fragment includes the header, so a unit that imports both std (MSVC's library includes the intrinsics) and tomlplusplus fails with "definition with same mangled name '?_mm_movemask_epi8@@...'". toml++ used SSE2 only to skip ASCII faster; with TOML_ENABLE_SIMD 0 the scalar path parses the same documents and the module includes no intrinsics header. --- pkgs/m/marzer.tomlplusplus.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/m/marzer.tomlplusplus.lua b/pkgs/m/marzer.tomlplusplus.lua index cff7e774..fbf46d7b 100644 --- a/pkgs/m/marzer.tomlplusplus.lua +++ b/pkgs/m/marzer.tomlplusplus.lua @@ -53,7 +53,8 @@ package = { }, sha256 = "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155", -- 1: Form B -> Form A (install() writes mcpp.toml + the module unit). - revision = 1, + -- 2: the module unit builds toml++ without its SSE2 path (TOML_ENABLE_SIMD 0). + revision = 2, }, }, macosx = { @@ -64,7 +65,8 @@ package = { }, sha256 = "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155", -- 1: Form B -> Form A (install() writes mcpp.toml + the module unit). - revision = 1, + -- 2: the module unit builds toml++ without its SSE2 path (TOML_ENABLE_SIMD 0). + revision = 2, }, }, windows = { @@ -75,7 +77,8 @@ package = { }, sha256 = "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155", -- 1: Form B -> Form A (install() writes mcpp.toml + the module unit). - revision = 1, + -- 2: the module unit builds toml++ without its SSE2 path (TOML_ENABLE_SIMD 0). + revision = 2, }, }, }, @@ -122,6 +125,13 @@ local MODULE_UNIT = [==[ module; #define TOML_UNDEF_MACROS 0 +// No SSE2 path: defines its intrinsics `static inline`, and +// under the MSVC ABI clang gives such a function the same mangled name in +// every module whose global module fragment includes it — a unit importing +// both `std` (MSVC's library includes the intrinsics) and `tomlplusplus` +// then fails with "definition with same mangled name". toml++ used SSE2 +// only to skip ASCII faster; the scalar path parses the same documents. +#define TOML_ENABLE_SIMD 0 // mcpp#797: a host-module compile is not given this package's include_dirs, // so reach the header relative to this file (src/modules/ -> include/). // Same file either way; restore `` once mcpp#797 is settled. From 3896add386ecce8c5594fae7a0675750efd21f92 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 27 Oct 2026 05:28:34 +0900 Subject: [PATCH 2/2] marzer.tomlplusplus: turn SSE2 off under the MSVC ABI only (_MSC_VER) The collision is an MSVC-ABI one; Linux, macOS and MinGW keep toml++'s SSE2 path. --- pkgs/m/marzer.tomlplusplus.lua | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/m/marzer.tomlplusplus.lua b/pkgs/m/marzer.tomlplusplus.lua index fbf46d7b..30c6388a 100644 --- a/pkgs/m/marzer.tomlplusplus.lua +++ b/pkgs/m/marzer.tomlplusplus.lua @@ -53,7 +53,7 @@ package = { }, sha256 = "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155", -- 1: Form B -> Form A (install() writes mcpp.toml + the module unit). - -- 2: the module unit builds toml++ without its SSE2 path (TOML_ENABLE_SIMD 0). + -- 2: under the MSVC ABI the module unit builds toml++ without its SSE2 path. revision = 2, }, }, @@ -65,7 +65,7 @@ package = { }, sha256 = "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155", -- 1: Form B -> Form A (install() writes mcpp.toml + the module unit). - -- 2: the module unit builds toml++ without its SSE2 path (TOML_ENABLE_SIMD 0). + -- 2: under the MSVC ABI the module unit builds toml++ without its SSE2 path. revision = 2, }, }, @@ -77,7 +77,7 @@ package = { }, sha256 = "8517f65938a4faae9ccf8ebb36631a38c1cadfb5efa85d9a72e15b9e97d25155", -- 1: Form B -> Form A (install() writes mcpp.toml + the module unit). - -- 2: the module unit builds toml++ without its SSE2 path (TOML_ENABLE_SIMD 0). + -- 2: under the MSVC ABI the module unit builds toml++ without its SSE2 path. revision = 2, }, }, @@ -125,13 +125,16 @@ local MODULE_UNIT = [==[ module; #define TOML_UNDEF_MACROS 0 -// No SSE2 path: defines its intrinsics `static inline`, and -// under the MSVC ABI clang gives such a function the same mangled name in -// every module whose global module fragment includes it — a unit importing -// both `std` (MSVC's library includes the intrinsics) and `tomlplusplus` -// then fails with "definition with same mangled name". toml++ used SSE2 -// only to skip ASCII faster; the scalar path parses the same documents. +// Under the MSVC ABI (cl, or clang in MSVC mode: both define _MSC_VER), +// no SSE2 path: defines its intrinsics `static inline`, and +// clang gives such a function the same mangled name in every module whose +// global module fragment includes it — a unit importing both `std` (MSVC's +// library includes the intrinsics) and `tomlplusplus` then fails with +// "definition with same mangled name". Elsewhere SSE2 stays on. toml++ uses +// it only to skip ASCII faster; the scalar path parses the same documents. +#if defined(_MSC_VER) #define TOML_ENABLE_SIMD 0 +#endif // mcpp#797: a host-module compile is not given this package's include_dirs, // so reach the header relative to this file (src/modules/ -> include/). // Same file either way; restore `` once mcpp#797 is settled.