From 78f9f8410e822f904fc41369d7166f15ef831e85 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 5 Aug 2015 17:06:52 -0700 Subject: [PATCH] Enable profiling builds on Mac and iOS --- .../flutter/build/config/compiler/BUILD.gn | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/engine/src/flutter/build/config/compiler/BUILD.gn b/engine/src/flutter/build/config/compiler/BUILD.gn index a9ed0059e6d..cac77a88b2a 100644 --- a/engine/src/flutter/build/config/compiler/BUILD.gn +++ b/engine/src/flutter/build/config/compiler/BUILD.gn @@ -274,27 +274,6 @@ config("compiler") { ldflags += common_mac_flags } else if (is_posix) { - # Non-Mac Posix compiler flags setup. - # ----------------------------------- - if (enable_profiling && !is_debug) { - # The GYP build spams this define into every compilation unit, as we do - # here, but it only appears to be used in base and a couple other places. - # TODO(abarth): Should we move this define closer to where it's used? - defines += [ "ENABLE_PROFILING" ] - - cflags += [ - "-fno-omit-frame-pointer", - "-g", - ] - - if (enable_full_stack_frames_for_profiling) { - cflags += [ - "-fno-inline", - "-fno-optimize-sibling-calls", - ] - } - } - # CPU architecture. We may or may not be doing a cross compile now, so for # simplicity we always explicitly set the architecture. if (current_cpu == "x64") { @@ -418,6 +397,25 @@ config("compiler") { } } + if (enable_profiling && !is_debug) { + # The GYP build spams this define into every compilation unit, as we do + # here, but it only appears to be used in base and a couple other places. + # TODO(abarth): Should we move this define closer to where it's used? + defines += [ "ENABLE_PROFILING" ] + + cflags += [ + "-fno-omit-frame-pointer", + "-g", + ] + + if (enable_full_stack_frames_for_profiling) { + cflags += [ + "-fno-inline", + "-fno-optimize-sibling-calls", + ] + } + } + # Linux/Android common flags setup. # --------------------------------- if (is_linux || is_android) {