Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1644)

Unified Diff: build/common.gypi

Issue 1432133002: build: Add Windows port of LLVM LTO config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use lld-link /lib instead of llvm-lib; use /llvmlibthin for thin archives Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index a253ce6766a7ccf9265189179aa69fc2b4745db4..61ee7f3b9d7355ef748fb796800f0522c602570c 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"', {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698