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

Unified Diff: build/config/win/BUILD.gn

Issue 2495643002: Make /fastlink builds as optimized as non-/fastlink builds (Closed)
Patch Set: Don't enable fastlink on minimal_symbols builds Created 4 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 | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/win/BUILD.gn
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 2b9f7bf77373532e5cca7d033bdd5459d460279f..562c85640d6783a990bd81cd17e2bd88bbdf383d 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -92,9 +92,21 @@ config("compiler") {
# release image. It is enabled for syzyasan builds and opportunistically for
# other builds where it is not prohibited (not supported when incrementally
# linking, using /debug:fastlink, or building with clang).
- if (is_syzyasan ||
- (!is_debug && !is_component_build && !is_win_fastlink && !is_clang)) {
- ldflags = [ "/PROFILE" ]
+ if (is_syzyasan || (!is_debug && !is_component_build && !is_clang)) {
+ if (is_win_fastlink) {
scottmg 2016/11/10 21:56:27 I think this changes the behaviour for is_syzyasan
brucedawson 2016/11/10 22:04:06 Good catch. Logic is hard. Agreed that it probably
brucedawson 2016/11/14 21:34:55 Done.
+ # /PROFILE implies the following linker flags. Therefore if we are
+ # skipping /PROFILE because it is incompatible with /DEBUG:FASTLINK
+ # we should explicitly add these flags in order to avoid unintended
+ # consequences such as larger binaries.
+ ldflags = [
+ "/OPT:REF",
+ "/OPT:ICF",
+ "/INCREMENTAL:NO",
+ "/FIXED:NO",
+ ]
+ } else {
+ ldflags = [ "/PROFILE" ]
+ }
}
# arflags apply only to static_libraries. The normal linker configs are only
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698