diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-10-14 16:48:21 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-10-14 16:48:21 +0200 |
| commit | 566e3116baeb4b83163d2ca7c0fbddf421940d3d (patch) | |
| tree | 53f6fa754b9822704b78b7c2885af63e4ee4be16 | |
| parent | e53bdf376e1fbfe9dea990defa4f007b694c134e (diff) | |
Add option to use lld.
| -rw-r--r-- | wscript | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 # |
