diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-02-05 18:58:47 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-09 08:29:46 -0500 |
commit | fad0b2b01c24159bea9204d45e38fb89eb0d7403 (patch) | |
tree | d546e6620926d501df59ca578346b5713aedde45 | |
parent | 009759811abb96c8d9a16126ef5c7bdea44a65d0 (diff) | |
download | haskell-fad0b2b01c24159bea9204d45e38fb89eb0d7403.tar.gz |
Rename -merge-objs flag to --merge-objs
For consistency with --make and friends.
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 2 | ||||
-rw-r--r-- | docs/users_guide/ghci.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/using.rst | 2 | ||||
-rw-r--r-- | testsuite/tests/driver/MergeObjsMode/Makefile | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index b6a075b1d1..9640c13a66 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -2210,7 +2210,7 @@ dynamic_flags_deps = [ (noArg (\d -> d { ghcLink=LinkDynLib })) , make_ord_flag defGhcFlag "staticlib" (noArg (\d -> setGeneralFlag' Opt_LinkRts (d { ghcLink=LinkStaticLib }))) - , make_ord_flag defGhcFlag "merge-objs" + , make_ord_flag defGhcFlag "-merge-objs" (noArg (\d -> d { ghcLink=LinkMergedObj })) , make_ord_flag defGhcFlag "dynload" (hasArg parseDynLibLoaderMode) , make_ord_flag defGhcFlag "dylib-install-name" (hasArg setDylibInstallName) diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index 9995814920..cb98b15f6a 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -3497,7 +3497,7 @@ When invoked in the static way, GHCi will use the GHC RTS's static runtime linker to load object files for imported modules when available. However, when these modules are built with :ghc-flag:`-split-sections` this linking can be quite expensive. To reduce this cost, package managers and build systems may -opt to produce a pre-linked *GHCi object* using the :ghc-flag:`-merge-objs` +opt to produce a pre-linked *GHCi object* using the :ghc-flag:`--merge-objs` mode. This merges the per-module objects into a single object, collapsing function sections into a single text section which can be efficiently loaded by the runtime linker. diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst index ec62096cd1..628dfab0f3 100644 --- a/docs/users_guide/using.rst +++ b/docs/users_guide/using.rst @@ -345,7 +345,7 @@ The available mode flags are: compile source files one at a time, or link objects together into an executable. See :ref:`options-order`. -.. ghc-flag:: -merge-objs +.. ghc-flag:: --merge-objs :shortdesc: Merge a set of objects into a GHCi library. :type: mode :category: phases diff --git a/testsuite/tests/driver/MergeObjsMode/Makefile b/testsuite/tests/driver/MergeObjsMode/Makefile index c36e0626a6..cbe8b8b678 100644 --- a/testsuite/tests/driver/MergeObjsMode/Makefile +++ b/testsuite/tests/driver/MergeObjsMode/Makefile @@ -6,7 +6,7 @@ MergeObjsMode : "$(TEST_HC)" $(TEST_HC_OPTS) -c A.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c B.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c Main.hs - "$(TEST_HC)" $(TEST_HC_OPTS) -merge-objs -o HSlib.o A.o B.o + "$(TEST_HC)" $(TEST_HC_OPTS) --merge-objs -o HSlib.o A.o B.o "$(TEST_HC)" $(TEST_HC_OPTS) -o Main Main.o HSlib.o ./Main |