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

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

Issue 2594153002: Fix conditional for /OPT:ICF so Debug non-component build does not warn. (Closed)
Patch Set: Improve comment Created 4 years 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/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index b5231b1537587a51bdcf520f1adb0afc7eb91cda..76ac51591829829963cd9ba7e0c74913118d5a39 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1266,9 +1266,14 @@ if (is_win) {
]
}
common_optimize_on_ldflags = []
- if (!is_component_build) {
+
+ # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+ # misleading symbols in stack traces. It is also incompatible with
+ # incremental linking, which we enable for both Debug and component builds.
+ if (!is_debug && !is_component_build) {
common_optimize_on_ldflags += [ "/OPT:ICF" ] # Redundant COMDAT folding.
}
+
if (is_official_build) {
common_optimize_on_ldflags += [ "/OPT:REF" ] # Remove unreferenced data.
if (!use_lld) {
« 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