From 0c616901b4aac24cadb2de054aed62efc81f4085 Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Thu, 19 Mar 2020 09:01:34 +0100 Subject: [PATCH] c_config: -flto and -fno-lto need to be passed also when linking --- waflib/Tools/c_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py index 500448ef..98187fac 100644 --- a/waflib/Tools/c_config.py +++ b/waflib/Tools/c_config.py @@ -150,7 +150,7 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=No elif x.startswith('-std='): prefix = 'CXXFLAGS' if '++' in x else 'CFLAGS' app(prefix, x) - elif x.startswith('+') or x in ('-pthread', '-fPIC', '-fpic', '-fPIE', '-fpie'): + elif x.startswith('+') or x in ('-pthread', '-fPIC', '-fpic', '-fPIE', '-fpie', '-flto', '-fno-lto'): app('CFLAGS', x) app('CXXFLAGS', x) app('LINKFLAGS', x)