[Git][ghc/ghc][master] misc: improve clangd compile_flags.txt flags

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Nov 15 00:08:27 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00
misc: improve clangd compile_flags.txt flags

This patch improves the compile_flags.txt config used to power clangd
for the rts C codebase. The flags in the file are sampled & deduped
from a real stage1 build with clang-19 and vastly improves the IDE
accuracy when hacking the rts.

For maximum code coverage under the default settings,
compile_flags.txt defaults to threaded+profiled+dynamic+debug way.
This does not mean profdyn needs to be actually built in _build/stage1
for IDE to work. To activate IDE for other RTS ways, simply remove one
of the -D flags at the end of compile_flags.txt and restart clangd.

- - - - -


1 changed file:

- compile_flags.txt


Changes:

=====================================
compile_flags.txt
=====================================
@@ -1,5 +1,29 @@
--xc
--Irts
+-Wimplicit
+-include
+rts/include/ghcversion.h
 -Irts/include
--I.hie-bios/stage0/lib
--I_build/stage1/rts/build/include/
+-I_build/stage1/rts/build
+-I_build/stage1/rts/build/include
+-Irts
+-Ilibraries/ghc-internal/include
+-I_build/stage1/libraries/ghc-internal/build/include
+-Ilibraries/ghc-bignum/include
+-I_build/stage1/libraries/ghc-bignum/build/include
+-Wno-unknown-pragmas
+-Wall
+-Wextra
+-Wstrict-prototypes
+-Wmissing-prototypes
+-Wmissing-declarations
+-Winline
+-Wpointer-arith
+-Wmissing-noreturn
+-Wnested-externs
+-Wredundant-decls
+-Wundef
+-DFS_NAMESPACE=rts
+-DCOMPILING_RTS
+-DTHREADED_RTS
+-DDEBUG
+-DDYNAMIC
+-DPROFILING



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/59e0a77021e26c550fde39bf3b67a03dda497633

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/59e0a77021e26c550fde39bf3b67a03dda497633
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241114/74464b9c/attachment-0001.html>


More information about the ghc-commits mailing list