blob: cda24835c766250630cc846af19be723fc5ce119 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
The final LTO link can run in parallel, saving significant time during
the linking step on multi-core machines. With CMake, -flto=jobserver
doesn't seem to work, so we evaluate `nproc` during prepare() instead.
diff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi
index 6853b5c3e..0b41946fa 100644
--- a/Telegram/gyp/settings_linux.gypi
+++ b/Telegram/gyp/settings_linux.gypi
@@ -52,7 +52,7 @@
'Release': {
'cflags_c': [ '-flto' ],
'cflags_cc': [ '-flto' ],
- 'ldflags': [ '-flto', '-fuse-linker-plugin' ],
+ 'ldflags': [ '-flto=@NPROC@', '-fuse-linker-plugin' ],
},
},
}]
|