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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 1952043003: Add SSE2/MMX build flags when building on an x86 host. This is necessary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved to compiler_cpu_abi config, and fixed for NaCl build Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/nacl/config.gni") 8 import("//build/config/nacl/config.gni")
9 import("//build/toolchain/cc_wrapper.gni") 9 import("//build/toolchain/cc_wrapper.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 # simplicity we always explicitly set the architecture. 477 # simplicity we always explicitly set the architecture.
478 if (current_cpu == "x64") { 478 if (current_cpu == "x64") {
479 cflags += [ 479 cflags += [
480 "-m64", 480 "-m64",
481 "-march=x86-64", 481 "-march=x86-64",
482 ] 482 ]
483 ldflags += [ "-m64" ] 483 ldflags += [ "-m64" ]
484 } else if (current_cpu == "x86") { 484 } else if (current_cpu == "x86") {
485 cflags += [ "-m32" ] 485 cflags += [ "-m32" ]
486 ldflags += [ "-m32" ] 486 ldflags += [ "-m32" ]
487 if (!is_nacl) {
488 cflags += [
489 "-msse2",
490 "-mfpmath=sse",
491 "-mmmx",
492 ]
493 }
487 } else if (current_cpu == "arm") { 494 } else if (current_cpu == "arm") {
488 if (is_clang && !is_android && !is_nacl) { 495 if (is_clang && !is_android && !is_nacl) {
489 cflags += [ 496 cflags += [
490 "-target", 497 "-target",
491 "arm-linux-gnueabihf", 498 "arm-linux-gnueabihf",
492 ] 499 ]
493 ldflags += [ 500 ldflags += [
494 "-target", 501 "-target",
495 "arm-linux-gnueabihf", 502 "arm-linux-gnueabihf",
496 ] 503 ]
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 1456
1450 if (is_ios || is_mac) { 1457 if (is_ios || is_mac) {
1451 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1458 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1452 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1459 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1453 config("enable_arc") { 1460 config("enable_arc") {
1454 common_flags = [ "-fobjc-arc" ] 1461 common_flags = [ "-fobjc-arc" ]
1455 cflags_objc = common_flags 1462 cflags_objc = common_flags
1456 cflags_objcc = common_flags 1463 cflags_objcc = common_flags
1457 } 1464 }
1458 } 1465 }
OLDNEW
« 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