Zubin pushed to branch wip/26435 at Glasgow Haskell Compiler / GHC
Commits:
-
1df941a0
by Zubin Duggal at 2025-09-30T17:34:22+05:30
4 changed files:
- compiler/GHC/Driver/Session.hs
- docs/users_guide/debug-info.rst
- + testsuite/tests/driver/T26435.stderr
- testsuite/tests/driver/all.T
Changes:
| ... | ... | @@ -3784,6 +3784,11 @@ makeDynFlagsConsistent dflags |
| 3784 | 3784 | hostFullWays
|
| 3785 | 3785 | in dflags_c
|
| 3786 | 3786 | |
| 3787 | + | gopt Opt_InfoTableMap dflags
|
|
| 3788 | + , LlvmCodeOutput <- backendCodeOutput (backend dflags)
|
|
| 3789 | + = loop (gopt_unset dflags Opt_InfoTableMap)
|
|
| 3790 | + "-finfo-table-map is incompatible with -fllvm"
|
|
| 3791 | + |
|
| 3787 | 3792 | | otherwise = (dflags, mempty, mempty)
|
| 3788 | 3793 | where loc = mkGeneralSrcSpan (fsLit "when making flags consistent")
|
| 3789 | 3794 | loop updated_dflags warning
|
| ... | ... | @@ -370,6 +370,11 @@ to a source location. This lookup table is generated by using the ``-finfo-table |
| 370 | 370 | also want more precise information about constructor info tables then you
|
| 371 | 371 | should also use :ghc-flag:`-fdistinct-constructor-tables`.
|
| 372 | 372 | |
| 373 | + .. note::
|
|
| 374 | + This flag is incompatible with :ghc-flag:`-fllvm`. If both flags are
|
|
| 375 | + enabled, GHC will emit a warning and :ghc-flag:`-finfo-table-map` will
|
|
| 376 | + have no effect.
|
|
| 377 | + |
|
| 373 | 378 | The :ghc-flag:`-finfo-table-map` flag will increase the binary size by quite
|
| 374 | 379 | a lot, depending on how big your project is. For compiling a project the
|
| 375 | 380 | size of GHC the overhead was about 200 megabytes.
|
| 1 | +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)]
|
|
| 2 | + -finfo-table-map is incompatible with -fllvm
|
|
| 3 | + |
| ... | ... | @@ -331,3 +331,4 @@ test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t |
| 331 | 331 | test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c'])
|
| 332 | 332 | test('T25382', normal, makefile_test, [])
|
| 333 | 333 | test('T26018', req_c, makefile_test, [])
|
| 334 | +test('T26435', normal, compile, ['-finfo-table-map -fllvm']) |