From dfb3ea4a6e3932a8695bb9d698e1f7e19cfc8238 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Tue, 21 Nov 2023 10:53:54 +0800 Subject: [PATCH 1/2] docs: standalone foreign libs are not Windows-only Correct the foreign-library documentation: the standalone option is required on Windows but is permitted (and meaningful) on other platforms too, so drop the inaccurate "must not be used on any other platform" claim. --- doc/cabal-package-description-file.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/cabal-package-description-file.rst b/doc/cabal-package-description-file.rst index 0607caec290..0384368ff38 100644 --- a/doc/cabal-package-description-file.rst +++ b/doc/cabal-package-description-file.rst @@ -2198,6 +2198,7 @@ A typical stanza for a foreign library looks like lib-version-info: 6:3:2 if os(Windows) + -- standalone must be used on Windows. options: standalone mod-def-file: MyForeignLib.def @@ -2228,8 +2229,7 @@ A typical stanza for a foreign library looks like have any dependencies on other (Haskell) shared libraries; without the ``standalone`` option the generated library would have dependencies on the Haskell runtime library (``libHSrts``), the base library - (``libHSbase``), etc. Currently, ``standalone`` *must* be used on Windows - and *must not* be used on any other platform. + (``libHSbase``), etc. The ``standalone`` option *must* be used on Windows. .. pkg-field:: mod-def-file: filename From 7638c5be4c0234dd5ba8372f2b28c20997a099a5 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Fri, 9 Oct 2026 17:17:34 +0800 Subject: [PATCH 2/2] docs: phrase the standalone-on-Windows rule as a current Cabal limitation Match the wording of the configure-time error in Distribution.Simple.Configure rather than implying an inherent Windows requirement. --- doc/cabal-package-description-file.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/cabal-package-description-file.rst b/doc/cabal-package-description-file.rst index 0384368ff38..e5d526b1b89 100644 --- a/doc/cabal-package-description-file.rst +++ b/doc/cabal-package-description-file.rst @@ -2198,7 +2198,7 @@ A typical stanza for a foreign library looks like lib-version-info: 6:3:2 if os(Windows) - -- standalone must be used on Windows. + -- Cabal currently only supports standalone foreign libraries on Windows. options: standalone mod-def-file: MyForeignLib.def @@ -2229,7 +2229,9 @@ A typical stanza for a foreign library looks like have any dependencies on other (Haskell) shared libraries; without the ``standalone`` option the generated library would have dependencies on the Haskell runtime library (``libHSrts``), the base library - (``libHSbase``), etc. The ``standalone`` option *must* be used on Windows. + (``libHSbase``), etc. Currently, Cabal can only build ``standalone`` + foreign libraries on Windows; a non-standalone foreign library is + rejected at configure time there. .. pkg-field:: mod-def-file: filename