diff options
author | pcc <pcc@chromium.org> | 2015-11-11 19:16:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-12 03:17:37 +0000 |
commit | 438f52c765ac1e4d170e7feed3a9024f04e170ef (patch) | |
tree | e36bc42f467edfc83e0dca1eb89f7782a201ae96 /build | |
parent | 266dc3a09194417b1e2a91d5c82d184f19137ab5 (diff) | |
download | chromium_src-438f52c765ac1e4d170e7feed3a9024f04e170ef.zip chromium_src-438f52c765ac1e4d170e7feed3a9024f04e170ef.tar.gz chromium_src-438f52c765ac1e4d170e7feed3a9024f04e170ef.tar.bz2 |
build: Add Windows port of LLVM LTO config; start using thin archives with lld.
This uses "-Xclang -emit-llvm-bc" because the clang-cl driver does not
support LTO.
BUG=507755
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1432133002
Cr-Commit-Position: refs/heads/master@{#359228}
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index a253ce6..61ee7f3 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -6002,6 +6002,9 @@ # Limited to Windows because lld-link is the driver that is # compatible with link.exe. ['LD', '<(make_clang_dir)/bin/lld-link'], + # lld-link includes a replacement for lib.exe that can produce thin + # archives and understands bitcode (for use_lto==1). + ['AR', '<(make_clang_dir)/bin/lld-link /lib /llvmlibthin'], ], }], ['OS=="android" and clang==0', { @@ -6087,6 +6090,15 @@ ], }], ], + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions': [ + # TODO(pcc): Add LTO support to clang-cl driver and use it here. + '-Xclang', + '-emit-llvm-bc', + ], + }, + }, }, }], # Apply a lower LTO optimization level as the default is too slow. @@ -6106,6 +6118,13 @@ }, }], ], + 'msvs_settings': { + 'VCLinkerTool': { + 'AdditionalOptions': [ + '/opt:lldlto=1', + ], + }, + }, }, }], ['use_lto==1 and clang==1 and target_arch=="arm"', { |