Enable profiling builds on Mac and iOS

This commit is contained in:
Chinmay Garde 2015-08-05 17:06:52 -07:00
parent d5fcb7b4ea
commit 78f9f8410e

View File

@ -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) {