[Git][ghc/ghc][wip/t21766] Detect darwin for `--enable-static-libzstd`

Finley McIlwaine (@FinleyMcIlwaine) gitlab at gitlab.haskell.org
Wed Mar 1 14:40:56 UTC 2023



Finley McIlwaine pushed to branch wip/t21766 at Glasgow Haskell Compiler / GHC


Commits:
d0d27379 by Finley McIlwaine at 2023-03-01T07:38:58-07:00
Detect darwin for `--enable-static-libzstd`

Update users guide to note the optional static linking of libzstd, and
update ci-images rev to get libzstd in debian images on CI

- - - - -


4 changed files:

- .gitlab-ci.yml
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/debug-info.rst
- m4/fp_find_libzstd.m4


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: 572353e0644044fe3a5465bba4342a9a0b0eb60e
+  DOCKER_REV: 6fc51b534f2e955b5e5f8e48eefe5d5c2cd84c05
 
   # Sequential version number of all cached things.
   # Bump to invalidate GitLab CI cache.


=====================================
docs/users_guide/9.8.1-notes.rst
=====================================
@@ -32,11 +32,15 @@ Compiler
   `here<https://gitlab.haskell.org/ghc/ghc/-/wikis/building>` for directions)
   and supply the ``--enable-ipe-data-compression`` flag to the ``configure``
   script. **Note**: This feature requires that the machine building GHC has
-  `libzstd <https://github.com/facebook/zstd/>`_ installed.
+  `libzstd <https://github.com/facebook/zstd/>`_ installed. The compression
+  library `libzstd` may optionally be statically linked in the resulting
+  compiler (on non-darwin machines) using the `--enable-static-libzstd`
+  configure flag.
 
   In a test compiling GHC itself, the size of the :ghc-flag:`-finfo-table-map`
   enabled build results was reduced by over 20% when compression was enabled.
 
+
 - Incoherent instance applications are no longer specialised. The previous implementation of
   specialisation resulted in nondeterministic instance resolution in certain cases, breaking
   the specification described in the documentation of the `INCOHERENT` pragma. See GHC ticket


=====================================
docs/users_guide/debug-info.rst
=====================================
@@ -380,10 +380,13 @@ to a source location. This lookup table is generated by using the ``-finfo-table
     binaries, consider building GHC from source and supplying the
     ``--enable-ipe-data-compression`` flag to the ``configure`` script. This
     will cause GHC to compress the :ghc-flag:`-finfo-table-map` related
-    debugging information included in binaries using the `libzstd
-    <https://github.com/facebook/zstd/>`_ compression library. **Note**: This
-    feature requires that the machine building GHC has
-    `libzstd <https://github.com/facebook/zstd/>`_ installed.
+    debugging information included in binaries using the
+    `libzstd <https://github.com/facebook/zstd/>`_ compression library.
+    **Note**: This feature requires that the machine building GHC has
+    `libzstd <https://github.com/facebook/zstd/>`_ installed. The compression
+    library ``libzstd`` may optionally be statically linked in the resulting
+    compiler (on non-darwin machines) using the ``--enable-static-libzstd``
+    configure flag.
 
     In a test compiling GHC itself, the size of the :ghc-flag:`-finfo-table-map`
     enabled build results was reduced by over 20% when compression was enabled.


=====================================
m4/fp_find_libzstd.m4
=====================================
@@ -19,7 +19,7 @@ AC_DEFUN([FP_FIND_LIBZSTD],
       [AS_HELP_STRING(
           [--enable-static-libzstd],
           [Statically link the libzstd compression library with the compiler
-          [default=no]]
+          (not compatible with darwin) [default=no]]
         )],
       [StaticLibZstd=1],
       [StaticLibZstd=0]
@@ -89,6 +89,12 @@ AC_DEFUN([FP_FIND_LIBZSTD],
     AC_SUBST([UseLibZstd],[YES])
     AC_SUBST([CabalHaveLibZstd],[True])
     if test $StaticLibZstd = "1" ; then
+      case "${host_os}" in
+          darwin*)
+            AC_MSG_ERROR(
+                  [--enable-static-libzstd is not compatible with darwin]
+                )
+      esac
       AC_SUBST([UseStaticLibZstd],[YES])
       AC_SUBST([CabalStaticLibZstd],[True])
     else



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d0d273796d6a28bc819e8cb61a89dd1ec0592b52

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d0d273796d6a28bc819e8cb61a89dd1ec0592b52
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230301/01eecf2f/attachment-0001.html>


More information about the ghc-commits mailing list