mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:21:31 +00:00
3c7075baca
This reverts commitfc9383ed41
. Reason for revert: After discussion with athom, the breakage is a known temporary situation. Original change's description: > Revert "[build] Use Fuchsia windows clang toolchain" > > This reverts commite479049467
. > > Reason for revert: Broke build on vm-fuchsia-release-x64. > > Original change's description: > > [build] Use Fuchsia windows clang toolchain > > > > Change-Id: Ie04039c736f40174cc45a61aa637a88fa53d9024 > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201862 > > Reviewed-by: Alexander Thomas <athom@google.com> > > TBR=aam@google.com,athom@google.com > > Change-Id: I3f1ce2c30bf0600b025bc95a051e569660e140c0 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204582 > Reviewed-by: Tess Strickland <sstrickl@google.com> > Commit-Queue: Tess Strickland <sstrickl@google.com> # Not skipping CQ checks because this is a reland. Change-Id: I0efe29d2dc11a2f3e65d65d2f2eaecc4c827490a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204583 Reviewed-by: Tess Strickland <sstrickl@google.com> Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Tess Strickland <sstrickl@google.com>
140 lines
3.5 KiB
Plaintext
140 lines
3.5 KiB
Plaintext
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import("tcmalloc_sources.gni")
|
|
|
|
config("internal_config") {
|
|
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
|
cflags = [
|
|
"-Wall",
|
|
"-Wextra",
|
|
"-Wno-format",
|
|
"-Wno-missing-field-initializers",
|
|
"-Wno-sign-compare",
|
|
"-Wno-type-limits",
|
|
"-Wno-unused-result",
|
|
"-Wno-unused-parameter",
|
|
"-Wno-unused-function",
|
|
"-Wno-unused-but-set-variable",
|
|
"-Wno-vla",
|
|
"-g3",
|
|
"-ggdb3",
|
|
"-fstack-protector",
|
|
"-Wa,--noexecstack",
|
|
"-fno-omit-frame-pointer",
|
|
"-fno-builtin-malloc",
|
|
"-fno-builtin-free",
|
|
"-fno-builtin-realloc",
|
|
"-fno-builtin-calloc",
|
|
"-fno-builtin-cfree",
|
|
"-fno-builtin-memalign",
|
|
"-fno-builtin-posix_memalign",
|
|
"-fno-builtin-valloc",
|
|
"-fno-builtin-pvalloc",
|
|
"-fsized-deallocation",
|
|
"-faligned-new",
|
|
]
|
|
if (is_clang) {
|
|
cflags += [
|
|
"-Wno-unused-const-variable",
|
|
"-Wno-implicit-int-float-conversion",
|
|
]
|
|
}
|
|
if (current_cpu == "arm" && !is_clang) {
|
|
cflags += [ "-Wno-psabi" ]
|
|
}
|
|
}
|
|
|
|
config("link_config") {
|
|
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
|
ldflags = [
|
|
# Don't let linker rip this symbol out, otherwise the heap&cpu
|
|
# profilers will not initialize properly on startup.
|
|
"-Wl,-uIsHeapProfilerRunning,-uProfilerStart",
|
|
]
|
|
}
|
|
|
|
source_set("dynamic_annotations") {
|
|
configs -= [
|
|
"//build/config/compiler:chromium_code",
|
|
"//build/config/compiler:clang_stackrealign",
|
|
]
|
|
configs += [ ":internal_config" ]
|
|
|
|
include_dirs = [
|
|
"include",
|
|
"gperftools/src/base",
|
|
"gperftools/src",
|
|
]
|
|
|
|
sources = [
|
|
"gperftools/src/base/dynamic_annotations.c",
|
|
"gperftools/src/base/dynamic_annotations.h",
|
|
]
|
|
}
|
|
|
|
source_set("tcmalloc") {
|
|
configs -= [
|
|
"//build/config/compiler:chromium_code",
|
|
"//build/config/compiler:clang_stackrealign",
|
|
"//build/config/compiler:compiler_arm_thumb",
|
|
]
|
|
configs += [ ":internal_config" ]
|
|
|
|
public_configs = [ ":link_config" ]
|
|
|
|
deps = [ ":dynamic_annotations" ]
|
|
|
|
include_dirs = [
|
|
"include",
|
|
"gperftools/src/base",
|
|
"gperftools/src",
|
|
]
|
|
|
|
# Disable the heap checker in tcmalloc.
|
|
defines = [
|
|
"ENABLE_EMERGENCY_MALLOC",
|
|
"NO_HEAP_CHECK",
|
|
|
|
# Disable debug even in a Dart Debug build. It is too slow.
|
|
"NDEBUG",
|
|
]
|
|
|
|
if (is_product) {
|
|
# Disable stack sampling for heap profiling in Product builds.
|
|
defines += [ "NO_TCMALLOC_SAMPLES" ]
|
|
|
|
# To override the C library functions, we can't hide symbols.
|
|
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
|
|
}
|
|
|
|
cflags = [
|
|
"-Wnon-virtual-dtor",
|
|
"-Woverloaded-virtual",
|
|
"-fno-rtti",
|
|
"-fpermissive",
|
|
]
|
|
|
|
if (!is_clang) {
|
|
cflags += [ "-Wno-format" ]
|
|
}
|
|
|
|
sources = tcmalloc_sources - [
|
|
# No debug allocator.
|
|
"gperftools/src/debugallocation.cc",
|
|
|
|
# Not needed when using emergency malloc.
|
|
"gperftools/src/fake_stacktrace_scope.cc",
|
|
|
|
# Not using the cpuprofiler
|
|
"gperftools/src/base/thread_lister.c",
|
|
"gperftools/src/base/thread_lister.h",
|
|
"gperftools/src/profile-handler.cc",
|
|
"gperftools/src/profile-handler.h",
|
|
"gperftools/src/profiledata.cc",
|
|
"gperftools/src/profiledata.h",
|
|
"gperftools/src/profiler.cc",
|
|
]
|
|
}
|