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

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

Issue 2865573002: build: Fix optimize_for_size build on Linux by adding an is_nacl guard. (Closed)
Patch Set: Add TODO to fix NaCl compiler Created 3 years, 7 months 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 7bc43b665c4dadcd01933c9478a26aba133b3638..fa983d6aea48068c378d6e24fb2ed89c8f662e80 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1449,8 +1449,10 @@ config("optimize") {
# Favor size over speed, /O1 must be before the common flags. The GYP
# build also specifies /Os and /GF but these are implied by /O1.
cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
- } else if (optimize_for_size) {
+ } else if (optimize_for_size && !is_nacl) {
# Favor size over speed.
+ # TODO(crbug.com/718650): Fix -Os in PNaCl compiler and remove the is_nacl
+ # guard above.
cflags = [ "-Os" ] + common_optimize_on_cflags
} else {
cflags = [ "-O2" ] + common_optimize_on_cflags
@@ -1464,8 +1466,10 @@ config("optimize_no_wpo") {
# Favor size over speed, /O1 must be before the common flags. The GYP
# build also specifies /Os and /GF but these are implied by /O1.
cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
- } else if (optimize_for_size) {
+ } else if (optimize_for_size && !is_nacl) {
# Favor size over speed.
+ # TODO(crbug.com/718650): Fix -Os in PNaCl compiler and remove the is_nacl
+ # guard above.
cflags = [ "-Os" ] + common_optimize_on_cflags
} else if (optimize_for_fuzzing) {
cflags = [ "-O1" ] + common_optimize_on_cflags
« 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