[GHC] #13477: Turn cIntegerLibraryType into a dynflag

#13477: Turn cIntegerLibraryType into a dynflag -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: GHC API | Version: 8.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Currently, at configure time we tell GHC whether integers are built using `integer-gmp` or `integer-simple`, and this gets baked in via the global constant `cIntegerLibraryType`. This is all fine for normal use of GHC (the program), but users of ghc (the library) might want to have more leeway here. A good solution seems to be turn this into a dynflag setting, so that users of the GHC API can adjust that as fit. From a cursory glance at the code, this does not seem to be a big problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13477 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13477: Turn cIntegerLibraryType into a dynflag -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: GHC API | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): Unfortunately (as usually with GHC API issues) even if we fix it in HEAD now it will take a long time until it reaches the user’s installation, so I have to work around it somehow anyways. And once I have a work-around, the need to get this fixed is lowered. Hence the low priority. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13477#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13477: Turn cIntegerLibraryType into a dynflag -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: GHC API | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): It keeps happening that when I want to file a bug report, I find that I have already filed it… A `ghc`-the-library that allows users to choose the integer library they want would be great. For example asterius, a WebAssembly backend in the making, would then have one reason less to build on a patched `ghc` (see https://tweag.github.io/asterius/building/) There are two issues: * Using `S#` if `integer-gmp` is used. Can easily be made dependent on the `DynFlags`. * Using the right unit id in `gHC_INTEGER_TYPE`, which is used in all kind of `…Name` symbols, which are used in other top-level definitions like `CoreRules`. Would be more invasive to make that dependent on `DynFlags`. I wonder if maybe GHC should just assume that the unit name is `integer`, and the build script of `integer-gmp` resp. `integer-simple` passes `-this-unit-id integer` instead? What would break in this simple model? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13477#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13477: Turn cIntegerLibraryType into a dynflag -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: patch Priority: low | Milestone: Component: GHC API | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5079 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => patch * differential: => Phab:D5079 Comment: Ok, that wasn’t too hard: Phab:D5079 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13477#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13477: Turn cIntegerLibraryType into a dynflag
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: task | Status: patch
Priority: low | Milestone:
Component: GHC API | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5079
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Krzysztof Gogolewski

#13477: Turn cIntegerLibraryType into a dynflag -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: merge Priority: low | Milestone: Component: GHC API | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5079 Wiki Page: | -------------------------------------+------------------------------------- Changes (by monoidal): * status: patch => merge Comment: Not sure if we'd like to merge this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13477#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13477: Turn cIntegerLibraryType into a dynflag -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: closed Priority: low | Milestone: 8.8.1 Component: GHC API | Version: 8.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5079 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: 8.6.2 => 8.8.1 Comment: I don't see any urgent need to merge this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13477#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC