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

Unified Diff: base/allocator/BUILD.gn

Issue 290713002: GN win: prep_libc and fix tcmalloc linkage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/allocator/prep_libc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/BUILD.gn
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn
index ac29edf763466228978ca65e29f02f53b5d687d5..e598f8f6c14708417e4f9127d733f1ccb9e3f790 100644
--- a/base/allocator/BUILD.gn
+++ b/base/allocator/BUILD.gn
@@ -14,6 +14,29 @@ group("allocator") {
}
}
+# This config and libc modification are only used on Windows.
+if (is_win) {
+ import("//build/config/win/visual_studio_version.gni")
+
+ config("nocmt") {
+ ldflags = [
+ "/NODEFAULTLIB:libcmt",
+ "/NODEFAULTLIB:libcmtd",
+ ]
+ libs = [ rebase_path("$target_gen_dir/allocator/libcmt.lib") ]
+ }
+
+ action("prep_libc") {
+ script = "prep_libc.py"
+ outputs = [ "$target_gen_dir/allocator/libcmt.lib" ]
+ args = [
+ visual_studio_path + "/vc/lib",
+ rebase_path("$target_gen_dir/allocator"),
+ cpu_arch,
+ ]
+ }
+}
+
if (!is_android) {
# tcmalloc currently won't compile on Android.
source_set("tcmalloc") {
@@ -125,6 +148,8 @@ if (!is_android) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = []
+
if (is_win) {
sources -= [
"$tcmalloc_dir/src/base/elf_mem_image.cc",
@@ -152,7 +177,14 @@ if (!is_android) {
"$tcmalloc_dir/src/profiler.cc",
]
defines += [ "PERFTOOLS_DLL_DECL=" ]
+
+ direct_dependent_configs = [ ":nocmt" ]
+
+ deps += [
+ ":prep_libc",
+ ]
}
+
if (is_linux || is_android) {
sources -= [
"$tcmalloc_dir/src/system-alloc.h",
@@ -191,7 +223,7 @@ if (!is_android) {
configs += [ "//build/config/compiler:optimize_max" ]
}
- deps = [
+ deps += [
"//base/third_party/dynamic_annotations",
]
« no previous file with comments | « no previous file | base/allocator/prep_libc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698