Use "official" build LTO settings

This commit is contained in:
Ales Pergl
2018-02-16 16:20:06 +01:00
parent 1860930b7e
commit 5e0111abc6
2 changed files with 14 additions and 0 deletions

View File

@@ -274,8 +274,20 @@
'-Wl,-O1',
'-Wl,--as-needed',
'-Wl,--gc-sections',
'-Wl,--icf=all',
],
}], # OS=="linux"
['OS=="linux" and target_arch in ["ia32", "x64", "arm64"]', {
'cflags': [
'-flto',
],
'ldflags': [
'-flto',
'-fuse-ld=gold',
'-Wl,-plugin-opt,O1',
'-Wl,-plugin-opt,-function-sections',
],
}],
],
}, # Release_Base
'conditions': [

View File

@@ -104,8 +104,10 @@
# Setup building with clang.
['clang==1', {
'make_global_settings': [
['AR', '<(make_clang_dir)/bin/llvm-ar'],
['CC', '<(make_clang_dir)/bin/clang'],
['CXX', '<(make_clang_dir)/bin/clang++'],
['AR.host', '$(AR)'],
['CC.host', '$(CC)'],
['CXX.host', '$(CXX)'],
],