Skip to content

Commit

Permalink
Add ppapi, improve Windows GN build.
Browse files Browse the repository at this point in the history
This adds ppapi-related targets except the tests to the GN build.

Did some minor tweaks to the .gypi ppapi lists. Some files were duplicated between the trusted and common lists which causes errors in GN (it doesn't uniquify the lists like GYP). Common is used in every place trusted is, so I just removed the duplicates from the trusted list.

Fixed some warnings in skia and tcmalloc. Added the ability to undefine NOMINMAX on Windows.

Fixed some src/ui Windows compilation issues.

BUG=
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/305513003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273016 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
brettw@chromium.org committed May 27, 2014
1 parent d074479 commit 240e303
Show file tree
Hide file tree
Showing 10 changed files with 795 additions and 20 deletions.
2 changes: 2 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ group("root") {
"//ipc",
"//mojo",
"//net",
"//ppapi:ppapi_c",
#"//sdch",
"//skia",
"//third_party/brotli",
Expand Down Expand Up @@ -95,6 +96,7 @@ group("root") {
if (is_android) {
deps -= [
"//content/public/common",
"//ppapi:ppapi_c",
"//third_party/libusb",
#"//third_party/WebKit/Source/platform",
"//third_party/WebKit/Source/wtf", # TODO(brettw) re-enable for Android.
Expand Down
6 changes: 6 additions & 0 deletions base/allocator/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ if (!is_android) {
]
defines += [ "PERFTOOLS_DLL_DECL=" ]

configs -= [
# Tcmalloc defines this itself, and we don't want duplicate definition
# warnings.
"//build/config/win:nominmax",
]

direct_dependent_configs = [ ":nocmt" ]

deps += [
Expand Down
1 change: 1 addition & 0 deletions build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ _native_compiler_configs = [
if (is_win) {
_native_compiler_configs += [
"//build/config/win:lean_and_mean",
"//build/config/win:nominmax",
"//build/config/win:sdk",
"//build/config/win:unicode",
]
Expand Down
13 changes: 12 additions & 1 deletion build/config/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ config("sdk") {
"_WIN32_WINNT=0x0602",
"_WINDOWS",
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
"NOMINMAX",
"NTDDI_VERSION=0x06020000",
"PSAPI_VERSION=1",
"WIN32",
Expand Down Expand Up @@ -129,3 +128,15 @@ config("lean_and_mean") {
"WIN32_LEAN_AND_MEAN",
]
}

# Nominmax --------------------------------------------------------------------

# Some third party code defines NOMINMAX before including windows.h, which
# then causes warnings when it's been previously defined on the command line.
# For such targets, this config can be removed.

config("nominmax") {
defines = [
"NOMINMAX",
]
}
3 changes: 0 additions & 3 deletions content/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@ source_set("common") {
if (!is_win || !use_aura) {
sources -= [ "cursors/webcursor_aurawin.cc" ]
}
if (!use_aura || !use_x11) {
sources -= [ "cursors/webcursor_aurax11.cc" ]
}

if (use_seccomp_bpf) {
defines += [ "USE_SECCOMP_BPF" ]
Expand Down
17 changes: 17 additions & 0 deletions gpu/ipc/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("ipc") {
sources = [
"gpu_command_buffer_traits.cc",
"gpu_command_buffer_traits.h",
]

configs += [ "//third_party/khronos:khronos_headers" ]

deps = [
"//gpu/command_buffer/common",
"//ipc",
]
}
Loading

0 comments on commit 240e303

Please sign in to comment.