import os, sys, re
-from waflib import Build, Options, Logs, Utils, Errors
+from waflib import Build, Options, Logs, Utils, Errors, Scripting
from waflib.Logs import debug
from waflib.Configure import conf
from waflib import ConfigSet
def check_project_rules(bld):
'''check the project rules - ensuring the targets are sane'''
+ if bld.__class__.__name__ == "ClangDbContext":
+ return
+
loops = {}
inc_loops = {}
Logs.info("Project rules pass")
+ timer = Utils.Timer()
+
+ bld.load('clang_compilation_database')
+ Scripting.run_command('clangdb')
+
+ debug("deps: clang_compilation_database: %s" % str(timer))
+
def CHECK_PROJECT_RULES(bld):
'''enable checking of project targets for sanity'''
action="store_true",
dest='undefined_sanitizer',
default=False)
- gr.add_option('--enable-clangdb',
- help=("Enable use of clang_compilation_database"),
- action="store_true", dest='enable_clangdb', default=False)
gr.add_option('--enable-libfuzzer',
help=("Build fuzzing binaries (use ADDITIONAL_CFLAGS to specify compiler options for libFuzzer or use CC=honggfuzz/hfuzz-cc)"),
action="store_true", dest='enable_libfuzzer', default=False)
conf.DEFINE('FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION', 1)
conf.env.FUZZ_TARGET_LDFLAGS = Options.options.FUZZ_TARGET_LDFLAGS
- conf.env.enable_clangdb = Options.options.enable_clangdb
- if conf.env.enable_clangdb:
- conf.load('clang_compilation_database')
- # Create a symlink of the compile db for clangd
- symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'),
- os.path.join(conf.srcnode.abspath(), 'compile_commands.json'),
- force=True)
+ # Create a symlink of the compile db for clangd
+ symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'),
+ os.path.join(conf.srcnode.abspath(), 'compile_commands.json'),
+ force=True)
conf.SAMBA_BUILD_ENV()
"PKG_CONFIG_PATH=${PREFIX_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH} "
"./configure.developer ${PREFIX} "
"--with-selftest-prefix=./bin/ab "
- "--enable-clangdb "
"--with-cluster-support "
"--without-ad-dc "
"--bundled-libraries=!tdb"),
from waflib import Logs
-Logs.info("\tSelected embedded Heimdal build")
+if bld.__class__.__name__ != "ClangDbContext":
+ Logs.info("\tSelected embedded Heimdal build")
bld.RECURSE('source4/heimdal_build')
from waflib import Logs
-Logs.info("\tSelected system Heimdal build")
+if bld.__class__.__name__ != "ClangDbContext":
+ Logs.info("\tSelected system Heimdal build")
bld.RECURSE('source4/heimdal_build')
from waflib import Logs
-Logs.info("\tSelected system MIT krb5 libraries, Heimdal use is disabled")
+if bld.__class__.__name__ != "ClangDbContext":
+ Logs.info("\tSelected system MIT krb5 libraries, Heimdal use is disabled")
#bld.RECURSE('source4/heimdal_build')