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

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..bbcd823cc1dd1d88fd5e00295f28c1dfa1193b60 100644
--- a/base/allocator/BUILD.gn
+++ b/base/allocator/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/allocator.gni")
+import("//build/config/win/visual_studio_version.gni")
# Only executables and not libraries should depend on the allocator target;
# only the application (the final executable) knows what allocator makes sense.
@@ -14,6 +15,14 @@ group("allocator") {
}
}
+config("nocmt") {
+ ldflags = [
+ "/NODEFAULTLIB:libcmt",
+ "/NODEFAULTLIB:libcmtd",
+ ]
+ libs = [ rebase_path("$target_gen_dir/allocator/libcmt.lib") ]
+}
+
if (!is_android) {
# tcmalloc currently won't compile on Android.
source_set("tcmalloc") {
@@ -152,6 +161,21 @@ if (!is_android) {
"$tcmalloc_dir/src/profiler.cc",
]
defines += [ "PERFTOOLS_DLL_DECL=" ]
+
+ direct_dependent_configs = [ ":nocmt" ]
+
+ action("prep_libc") {
brettw 2014/05/17 02:38:37 Can you avoid nesting targets? I've been wanting t
scottmg 2014/05/17 16:29:16 OK, I'll do that. It seems unfortunate to move th
+ 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,
+ ]
+ }
+ deps = [
+ ":prep_libc",
+ ]
}
if (is_linux || is_android) {
sources -= [
@@ -191,7 +215,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