summaryrefslogtreecommitdiff
path: root/common.gypi
diff options
context:
space:
mode:
Diffstat (limited to 'common.gypi')
-rw-r--r--common.gypi11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.gypi b/common.gypi
index 65eb7caf57..9d74b46a8d 100644
--- a/common.gypi
+++ b/common.gypi
@@ -176,6 +176,17 @@
['OS!="mac" and OS!="win"', {
'cflags': [ '-fno-omit-frame-pointer' ],
}],
+ ['OS=="linux"', {
+ 'variables': {
+ 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ',
+ },
+ 'conditions': [
+ ['enable_lto=="true"', {
+ 'cflags': ['<(lto)'],
+ 'ldflags': ['<(lto)'],
+ },],
+ ],
+ },],
['OS == "android"', {
'cflags': [ '-fPIE' ],
'ldflags': [ '-fPIE', '-pie' ]