haskell / haskell/cabal

Compile the same package with respect to several sets of flag states

Offen
#827 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Cabal: other old-milestone: ⊥ type: enhancement
Vorherrschende Sprache
Haskell
Sterne
1.7k
Forks
750
Ø Merge
4 T. 3 Std.
Gemergte PRs (30 T.)
28

Beschreibung

(Imported from [Trac #837](http://hackage.haskell.org/trac/hackage/ticket/837), reported by lemming on 2011-04-24)

Currently I have configured my cabal with --enable-library-profiling, --enable-shared, what leads to problems with the GHC-7.0.\* archives that do not contain shared objects for profiling. Actually, I do not need them, but I cannot tell Cabal to omit shared objects for profiling. If I use --enable-library-profiling and --enable-shared, then all combinations of {static, dynamic} x {non-profiling, profiling} are generated.

Instead of enabling two variants by each of those 'enable' options and then generating code for all possible combinations, I would find it more useful to define sets of flags and compile modules with respect to all of these flag sets. E.g. I could write something like the following to ~/.cabal/config:

flagset: dyn

shared: True
optimization: True
flagset: p
shared: False
profiling: True
optimization: True
rts-options: True
flagset: dbg
flags: debug
optimization: True
For every module A this should generate A_dyn.o, A_p.o, A_dbg.o.

I do not know whether this problem can be solved in Cabal alone, or whether it also needs adaption of GHC.

See also:

  • #600
  • [http://hackage.haskell.org/trac/ghc/ticket/5021](http://hackage.haskell.org/trac/ghc/ticket/5021)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.