mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-13 13:38:20 +00:00
Cabal 3.17 deduplicates flattened compiler and linker argument lists, which drops the second -framework from Security/CoreFoundation links. Remove the two token-level deduplications while retaining framework search-directory deduplication and registered framework metadata. Patch the Cabal library in haskell.nix's v2 build tool only for Darwin archive projects. Preserve the tool's existing patches and evalWith variants, and leave native CLI and Linux/Android build tools unchanged.
28 lines
918 B
Diff
28 lines
918 B
Diff
Preserve ordered compiler/linker arguments when invoking hsc2hs.
|
|
|
|
Deduplicating individual tokens corrupts repeated option/argument pairs:
|
|
-framework Security -framework CoreFoundation
|
|
becomes:
|
|
-framework Security CoreFoundation
|
|
The same applies to compiler options such as repeated -include. Leave
|
|
deduplication of framework directory values in place.
|
|
|
|
--- a/src/Distribution/Simple/PreProcess.hs
|
|
+++ b/src/Distribution/Simple/PreProcess.hs
|
|
@@ -525,7 +525,6 @@
|
|
where
|
|
ldflags =
|
|
map ("--lflag=" ++) $
|
|
- ordNub $
|
|
concat
|
|
[ programDefaultArgs gccProg ++ programOverrideArgs gccProg
|
|
, osxFrameworkDirs
|
|
@@ -574,7 +573,6 @@
|
|
|
|
cflags =
|
|
map ("--cflag=" ++) $
|
|
- ordNub $
|
|
concat
|
|
[ programDefaultArgs gccProg ++ programOverrideArgs gccProg
|
|
, osxFrameworkDirs
|