From: Carl Hetherington Date: Mon, 14 Oct 2019 14:48:21 +0000 (+0200) Subject: Add option to use lld. X-Git-Tag: v2.15.23~1 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=566e3116baeb4b83163d2ca7c0fbddf421940d3d Add option to use lld. --- diff --git a/wscript b/wscript index 896b68ab2..8c3b4548a 100644 --- a/wscript +++ b/wscript @@ -67,6 +67,7 @@ def options(opt): opt.add_option('--workaround-gssapi', action='store_true', default=False, help='link to gssapi_krb5') opt.add_option('--force-cpp11', action='store_true', default=False, help='force use of C++11') opt.add_option('--variant', help='build variant (swaroop-studio, swaroop-theater)', choices=['swaroop-studio', 'swaroop-theater']) + opt.add_option('--use-lld', action='store_true', default=False, help='use lld linker') def configure(conf): conf.load('compiler_cxx') @@ -121,6 +122,13 @@ def configure(conf): if conf.options.variant.startswith('swaroop-'): conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_SWAROOP') + if conf.options.use_lld: + try: + conf.find_program('ld.lld') + conf.env.append_value('LINKFLAGS', '-fuse-ld=lld') + except conf.errors.ConfigurationError: + pass + # # Windows/Linux/OS X specific #