Add support for generating clang compilation database by default (#35629)

compilation db by default
pull/35630/head
DevTekVE 2 weeks ago committed by GitHub
parent e503e657bc
commit 2183b4ca7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      SConstruct

@ -39,10 +39,6 @@ AddOption('--clazy',
action='store_true', action='store_true',
help='build with clazy') help='build with clazy')
AddOption('--compile_db',
action='store_true',
help='build clang compilation database')
AddOption('--ccflags', AddOption('--ccflags',
action='store', action='store',
type='string', type='string',
@ -214,8 +210,7 @@ if arch == "Darwin":
darwin_rpath_link_flags = [f"-Wl,-rpath,{path}" for path in env["RPATH"]] darwin_rpath_link_flags = [f"-Wl,-rpath,{path}" for path in env["RPATH"]]
env["LINKFLAGS"] += darwin_rpath_link_flags env["LINKFLAGS"] += darwin_rpath_link_flags
if GetOption('compile_db'): env.CompilationDatabase('compile_commands.json')
env.CompilationDatabase('compile_commands.json')
# Setup cache dir # Setup cache dir
cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache' cache_dir = '/data/scons_cache' if AGNOS else '/tmp/scons_cache'

Loading…
Cancel
Save