Skip to content

Commit

Permalink
gn format // (the rest, except mojo)
Browse files Browse the repository at this point in the history
Excluded mojo because I think that needs to happen on the other side.

At gn --version = 306668 for which roll is in CQ.

R=brettw@chromium.org
TBR=scherkus@chromium.org
BUG=348474

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

Cr-Commit-Position: refs/heads/master@{#306708}
  • Loading branch information
sgraham authored and Commit bot committed Dec 3, 2014
1 parent e00b5de commit 34fb7e5
Show file tree
Hide file tree
Showing 105 changed files with 1,332 additions and 1,226 deletions.
4 changes: 1 addition & 3 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ secondary_source = "//build/secondary/"
# matching these patterns (see "gn help label_pattern" for format) will have
# their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check".
check_targets = [
"//base"
]
check_targets = [ "//base" ]
17 changes: 6 additions & 11 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ group("root") {
"//ui/web_dialogs",
"//url",
"//v8:v8",
] + root_extra_deps
]
deps += root_extra_deps

if (!is_win) {
deps += [ "//breakpad:symupload" ]
Expand All @@ -160,16 +161,12 @@ group("root") {
}

if (is_win) {
deps += [
"//ui/metro_viewer",
]
deps += [ "//ui/metro_viewer" ]
}

if (is_win || is_mac || is_chromeos) {
# RLZ works on these platforms.
deps += [
"//rlz:rlz_lib",
]
deps += [ "//rlz:rlz_lib" ]
}

if (cpu_arch == "x86" || cpu_arch == "x64") {
Expand All @@ -195,9 +192,7 @@ group("root") {
]

if (has_chrome_android_internal) {
deps += [
"//clank",
]
deps += [ "//clank" ]
}

# TODO(GYP): Move the targets in the rest of this block that still
Expand Down Expand Up @@ -267,7 +262,7 @@ group("root") {
]
}

#
#
# TODO(GYP): Make everything below this work in the GN build.
#

Expand Down
35 changes: 14 additions & 21 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")

gypi_values = exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("ash.gyp") ],
"scope",
[ "ash.gyp" ])
gypi_values = exec_script("//build/gypi_to_gn.py",
[ rebase_path("ash.gyp") ],
"scope",
[ "ash.gyp" ])

component("ash") {
sources = gypi_values.ash_sources
Expand Down Expand Up @@ -58,14 +57,13 @@ component("ash") {
"sticky_keys/sticky_keys_controller.cc",
"sticky_keys/sticky_keys_controller.h",
]

# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
cflags = [ "/wd4267" ]
}

if (use_x11) {
configs += [
"//build/config/linux:xfixes",
]
configs += [ "//build/config/linux:xfixes" ]
} else {
sources -= [
"accelerators/key_hold_detector.cc",
Expand Down Expand Up @@ -111,9 +109,7 @@ component("ash") {
}

if (!use_ozone) {
sources -= [
"host/ash_window_tree_host_ozone.cc",
]
sources -= [ "host/ash_window_tree_host_ozone.cc" ]
}
}

Expand Down Expand Up @@ -205,6 +201,7 @@ static_library("ash_shell_lib") {
"//ash/strings",
"//base",
"//base:i18n",

#"//chrome:packed_resources", TODO(GYP)
"//content",
"//content/shell:content_shell_lib",
Expand Down Expand Up @@ -277,8 +274,10 @@ test("ash_unittests") {
sources -= [
# TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
"focus_cycler_unittest.cc",

# All tests for multiple displays: not supported on Windows Ash.
"wm/drag_window_resizer_unittest.cc",

# Can't resize on Windows Ash. http://crbug.com/165962
"magnifier/magnification_controller_unittest.cc",
"wm/workspace/workspace_window_resizer_unittest.cc",
Expand Down Expand Up @@ -321,17 +320,15 @@ test("ash_unittests") {
}

if (!use_x11 || !is_chromeos) {
sources -= [ "touch/touch_transformer_controller_unittest.cc", ]
sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
}

# TODO(GYP) is this necessary?
#['OS=="linux" and component=="shared_library" and use_allocator!="none"', {
# ldflags = "-rdynamic"

if (!is_chromeos || use_ozone) {
sources -= [
"sticky_keys/sticky_keys_unittest.cc", # crbug.com/354035
]
sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035
}
}

Expand All @@ -349,15 +346,11 @@ executable("ash_shell") {
if (is_win) {
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
deps += [
"//sandbox",
]
deps += [ "//sandbox" ]
}

if (is_chromeos) {
deps += [
"//device/bluetooth",
]
deps += [ "//device/bluetooth" ]
}
}

Expand Down
4 changes: 3 additions & 1 deletion base/allocator/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ if (is_win) {

action("prep_libc") {
script = "prep_libc.py"
outputs = [ "$target_gen_dir/allocator/libcmt.lib" ]
outputs = [
"$target_gen_dir/allocator/libcmt.lib",
]
args = [
visual_studio_path + "/vc/lib",
rebase_path("$target_gen_dir/allocator"),
Expand Down
47 changes: 25 additions & 22 deletions breakpad/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# found in the LICENSE file.

config("tools_config") {
include_dirs = [ "src", "src/third_party" ]
include_dirs = [
"src",
"src/third_party",
]
if (is_android) {
defines = [ "__ANDROID__" ]
}
Expand Down Expand Up @@ -32,9 +35,7 @@ config("client_config") {
}

config("handler_config") {
include_dirs = [
"src",
]
include_dirs = [ "src" ]
}

# {micro,mini}dump_stackwalk and minidump_dump are tool-type executables that do
Expand Down Expand Up @@ -86,6 +87,7 @@ if (current_toolchain == host_toolchain && !is_win) {
"src/processor/stackwalker_x86.h",
"src/processor/tokenize.cc",
"src/processor/tokenize.h",

# libdisasm
"src/third_party/libdisasm/ia32_implicit.c",
"src/third_party/libdisasm/ia32_implicit.h",
Expand Down Expand Up @@ -129,7 +131,9 @@ if (current_toolchain == host_toolchain && !is_win) {
"src/processor/microdump_stackwalk.cc",
]

deps = [ ":stackwalk_common" ]
deps = [
":stackwalk_common",
]

defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]

Expand All @@ -146,7 +150,9 @@ if (current_toolchain == host_toolchain && !is_win) {
"src/processor/minidump_stackwalk.cc",
]

deps = [ ":stackwalk_common" ]
deps = [
":stackwalk_common",
]

defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]

Expand Down Expand Up @@ -253,9 +259,7 @@ if (current_toolchain == host_toolchain && is_mac) {
"src/tools/mac/symupload/symupload.m",
]

include_dirs = [
"src/common/mac"
]
include_dirs = [ "src/common/mac" ]

libs = [ "Foundation.framework" ]

Expand Down Expand Up @@ -313,7 +317,7 @@ if (is_mac) {
]

deps = [
":utilities"
":utilities",
]
}

Expand Down Expand Up @@ -341,9 +345,7 @@ if (is_mac) {
public_configs = [ ":breakpad_config" ]

defines = [ "USE_PROTECTED_ALLOCATIONS=1" ]
include_dirs = [
"src/client/apple/Framework",
]
include_dirs = [ "src/client/apple/Framework" ]

deps = [
":utilities",
Expand Down Expand Up @@ -604,7 +606,6 @@ if (is_linux) {
cflags = [ "-Wno-unused-value" ]
}


if (is_android) {
sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ]
libs = [ "log" ]
Expand All @@ -621,16 +622,13 @@ if (is_linux) {
":processor_support",
]

include_dirs = [
"src",
]
include_dirs = [ "src" ]

if (cpu_arch == "mipsel" && is_android) {
include_dirs += [ "src/common/android/include" ]
}
}


executable("generate_test_dump") {
testonly = true
sources = [
Expand All @@ -641,7 +639,9 @@ if (is_linux) {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]

deps = [ ":client" ]
deps = [
":client",
]

include_dirs = [ "src" ]

Expand All @@ -652,11 +652,15 @@ if (is_linux) {
}

executable("minidump-2-core") {
sources = [ "src/tools/linux/md2core/minidump-2-core.cc" ]
sources = [
"src/tools/linux/md2core/minidump-2-core.cc",
]

include_dirs = [ "src" ]

deps = [ ":client" ]
deps = [
":client",
]
}

executable("core-2-minidump") {
Expand Down Expand Up @@ -726,7 +730,6 @@ if (is_ios) {
"src/common/mac",
]
}

# TODO(GYP) There is some XCode-only targets like ninja-breakpad.
}

Expand Down
18 changes: 6 additions & 12 deletions build/config/android/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ if (is_android) {
# Toolchain root directory for each build. The actual binaries are inside
# a "bin" directory inside of these.
_android_toolchain_version = "4.9"
x86_android_toolchain_root =
"$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
arm_android_toolchain_root =
"$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
mips_android_toolchain_root =
"$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"

# Location of libgcc. This is only needed for the current GN toolchain, so we
# only need to define the current one, rather than one for every platform
Expand All @@ -109,20 +106,17 @@ if (is_android) {
android_prebuilt_arch = "android-x86"
_binary_prefix = "i686-linux-android"
android_toolchain_root = "$x86_android_toolchain_root"
android_libgcc_file =
"$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_version}/libgcc.a"
android_libgcc_file = "$android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_version}/libgcc.a"
} else if (cpu_arch == "arm") {
android_prebuilt_arch = "android-arm"
_binary_prefix = "arm-linux-androideabi"
android_toolchain_root = "$arm_android_toolchain_root"
android_libgcc_file =
"$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchain_version}/libgcc.a"
android_libgcc_file = "$android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchain_version}/libgcc.a"
} else if (cpu_arch == "mipsel") {
android_prebuilt_arch = "android-mips"
_binary_prefix = "mipsel-linux-android"
android_toolchain_root = "$mips_android_toolchain_root"
android_libgcc_file =
"$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain_version}/libgcc.a"
android_libgcc_file = "$android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain_version}/libgcc.a"
} else {
assert(false, "Need android libgcc support for your target arch.")
}
Expand Down
16 changes: 12 additions & 4 deletions build/config/android/internal_rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ template("process_java_prebuilt") {
sources = [
_input_jar_path,
]
outputs = [ _output_jar_path ]
outputs = [
_output_jar_path,
]
}
}

Expand Down Expand Up @@ -901,8 +903,12 @@ template("java_library_impl") {
_final_deps += [ ":${_template_name}__standalone_dex" ]
_rebased_build_config = rebase_path(_build_config, root_build_dir)
dex("${_template_name}__standalone_dex") {
sources = [_jar_path]
inputs = [_build_config]
sources = [
_jar_path,
]
inputs = [
_build_config,
]
output = invoker.standalone_dex_path
dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files"
args = [ "--inputs=@FileArg($dex_arg_key)" ]
Expand Down Expand Up @@ -1033,7 +1039,9 @@ template("copy_ex") {
}

depfile = "$target_gen_dir/$target_name.d"
outputs = [ depfile ]
outputs = [
depfile,
]

args = [
"--depfile",
Expand Down
Loading

0 comments on commit 34fb7e5

Please sign in to comment.