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

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

Issue 1363793002: Port the order_profiling GYP flag to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
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/toolchain/ccache.gni") 8 import("//build/toolchain/ccache.gni")
9 9
10 if (current_cpu == "arm") { 10 if (current_cpu == "arm") {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. 183 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
184 cflags += [ "--param=ssp-buffer-size=4" ] 184 cflags += [ "--param=ssp-buffer-size=4" ]
185 if (is_android && (current_cpu == "arm64" || current_cpu == "x86")) { 185 if (is_android && (current_cpu == "arm64" || current_cpu == "x86")) {
186 cflags += [ "-fno-stack-protector" ] 186 cflags += [ "-fno-stack-protector" ]
187 } else { 187 } else {
188 cflags += [ "-fstack-protector" ] 188 cflags += [ "-fstack-protector" ]
189 } 189 }
190 } 190 }
191 191
192 # Linker warnings. 192 # Linker warnings.
193 if (!(is_chromeos && current_cpu == "arm") && !is_mac && !is_ios) { 193 if (!(is_chromeos && current_cpu == "arm") &&
194 !(is_android && order_profiling) && !is_mac && !is_ios) {
194 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 195 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
196 # TODO(azarchs): Fix link errors when linking with order_profiling=1
197 # crbug.com/485542
195 ldflags += [ "-Wl,--fatal-warnings" ] 198 ldflags += [ "-Wl,--fatal-warnings" ]
196 } 199 }
197 200
198 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer, 201 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer,
199 # MemorySanitizer and non-official CFI builds. 202 # MemorySanitizer and non-official CFI builds.
200 if (using_sanitizer || (is_cfi && !is_official_build)) { 203 if (using_sanitizer || (is_cfi && !is_official_build)) {
201 cflags += [ 204 cflags += [
202 "-fno-omit-frame-pointer", 205 "-fno-omit-frame-pointer",
203 "-gline-tables-only", 206 "-gline-tables-only",
204 ] 207 ]
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 # TODO(eugenis): find a way to reenable this. 633 # TODO(eugenis): find a way to reenable this.
631 cflags += [ "-mllvm -asan-globals=0" ] 634 cflags += [ "-mllvm -asan-globals=0" ]
632 } 635 }
633 636
634 defines += [ "ANDROID" ] 637 defines += [ "ANDROID" ]
635 638
636 # The NDK has these things, but doesn't define the constants 639 # The NDK has these things, but doesn't define the constants
637 # to say that it does. Define them here instead. 640 # to say that it does. Define them here instead.
638 defines += [ "HAVE_SYS_UIO_H" ] 641 defines += [ "HAVE_SYS_UIO_H" ]
639 642
643 if (order_profiling) {
644 defines += [ "CYGPROFILE_INSTRUMENTATION=1" ]
agrieve 2015/09/23 19:20:48 Would be better to put this in the default_finstru
pkotwicz 2015/09/23 19:57:08 I moved this to the finstrument_functions config a
645 }
646
640 # Use gold for Android for most CPU architectures. 647 # Use gold for Android for most CPU architectures.
641 if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") { 648 if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") {
642 ldflags += [ "-fuse-ld=gold" ] 649 ldflags += [ "-fuse-ld=gold" ]
643 if (is_clang) { 650 if (is_clang) {
644 # Let clang find the ld.gold in the NDK. 651 # Let clang find the ld.gold in the NDK.
645 ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] 652 ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ]
646 } 653 }
647 654
648 # Use -mstackrealign due to a bug on ia32 Jelly Bean. 655 # Use -mstackrealign due to a bug on ia32 Jelly Bean.
649 # See crbug.com/521527 656 # See crbug.com/521527
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 } else if (symbol_level == 1) { 1509 } else if (symbol_level == 1) {
1503 cflags = minimal_symbols_cflags 1510 cflags = minimal_symbols_cflags
1504 ldflags = minimal_symbols_ldflags 1511 ldflags = minimal_symbols_ldflags
1505 } else if (symbol_level == 2) { 1512 } else if (symbol_level == 2) {
1506 cflags = symbols_cflags 1513 cflags = symbols_cflags
1507 ldflags = symbols_ldflags 1514 ldflags = symbols_ldflags
1508 } else { 1515 } else {
1509 assert(false) 1516 assert(false)
1510 } 1517 }
1511 } 1518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698