Zubin pushed to branch wip/26435 at Glasgow Haskell Compiler / GHC
Commits:
-
9b74d982
by Zubin Duggal at 2025-12-18T14:49:03+05:30
6 changed files:
- compiler/GHC/Driver/Session.hs
- docs/users_guide/debug-info.rst
- + testsuite/tests/driver/T26435.ghc.stderr
- + testsuite/tests/driver/T26435.hs
- + testsuite/tests/driver/T26435.stdout
- testsuite/tests/driver/all.T
Changes:
| ... | ... | @@ -3843,6 +3843,11 @@ makeDynFlagsConsistent dflags |
| 3843 | 3843 | hostFullWays
|
| 3844 | 3844 | in dflags_c
|
| 3845 | 3845 | |
| 3846 | + | gopt Opt_InfoTableMap dflags
|
|
| 3847 | + , LlvmCodeOutput <- backendCodeOutput (backend dflags)
|
|
| 3848 | + = loop (gopt_unset dflags Opt_InfoTableMap)
|
|
| 3849 | + "-finfo-table-map is incompatible with -fllvm and is disabled (See #26435)"
|
|
| 3850 | + |
|
| 3846 | 3851 | | otherwise = (dflags, mempty, mempty)
|
| 3847 | 3852 | where loc = mkGeneralSrcSpan (fsLit "when making flags consistent")
|
| 3848 | 3853 | 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 and is disabled (See #26435)
|
|
| 3 | + |
|
| 4 | +[1 of 2] Compiling Main ( T26435.hs, T26435.o )
|
|
| 5 | +[2 of 2] Linking T26435 |
| 1 | +module Main where
|
|
| 2 | +import GHC.InfoProv
|
|
| 3 | + |
|
| 4 | +main :: IO ()
|
|
| 5 | +main = print =<< whereFrom main |
| 1 | +Nothing |
| ... | ... | @@ -334,3 +334,4 @@ test('T26018', req_c, makefile_test, []) |
| 334 | 334 | test('T24120', normal, compile, ['-Wunused-packages -hide-all-packages -package base -package system-cxx-std-lib'])
|
| 335 | 335 | test('T26551', [extra_files(['T26551.hs'])], makefile_test, [])
|
| 336 | 336 | test('T24731', [only_ways(['ext-interp'])], compile, ['-fexternal-interpreter -pgmi ""'])
|
| 337 | +test('T26435', [only_ways(['llvm'])], warn_and_run, ['-finfo-table-map']) |