blob: 124d2d92c7244d69356a00d69bcea332fc1760a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
diff --git a/build/gen.py b/build/gen.py
index d2305c8f..811c2e95 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -324,8 +324,11 @@ def WriteGNNinja(path, platform, host, options):
ldflags.append('-Wl,--icf=all')
if options.use_lto:
- cflags.extend(['-flto', '-fwhole-program-vtables'])
- ldflags.extend(['-flto', '-fwhole-program-vtables'])
+ cflags.append('-flto')
+ ldflags.append('-flto')
+ if "clang" in cxx:
+ cflags.append('-fwhole-program-vtables')
+ ldflags.append('-fwhole-program-vtables')
cflags.extend([
'-D_FILE_OFFSET_BITS=64',
|