19 lines
630 B
Diff
19 lines
630 B
Diff
|
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',
|