blob: c4260b44c64762578d41b3d7a5c35e327fc51e1a (
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 ee4f8e14..89714678 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -332,8 +332,11 @@ def WriteGNNinja(path, platform, host, options):
ldflags.extend(['-maix64', '-pthread'])
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 cc:
+ cflags.append('-fwhole-program-vtables')
+ ldflags.append('-fwhole-program-vtables')
elif platform.is_msvc():
if not options.debug:
|