diff options
25 files changed, 118 insertions, 157 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 462008c..1831500 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/ui.gni") declare_args() { # When set, turns off the (normally-on) iterator debugging and related stuff - # that is normall turned on for Debug builds. These are generally useful for + # that is normally turned on for Debug builds. These are generally useful for # catching bugs but in some cases may cause conflicts or excessive slowness. disable_iterator_debugging = false } diff --git a/build/config/android/config.gni b/build/config/android/config.gni index c740812..d012d2b 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -4,20 +4,17 @@ # This file contains common system config stuff for the Android build. -# TODO(brettw) bug 341772 put this into the is_android block when the toolchain -# stuff is fixed in the GYP generator. The problem is that when we redo the -# build in host mode, the OS is not android and the declarations are never -# seen, which throws an error because these arguments are specified. -declare_args() { - android_src = "" +if (is_android) { + declare_args() { + # Absolute directory containing the Android source code. + android_src = "" - # This is set when building the Android WebView inside the Android build - # system, using the 'android' gyp backend. The WebView code is still built - # when this is unset, but builds using the normal chromium build system. - is_android_webview_build = false -} + # This is set when building the Android WebView inside the Android build + # system, using the 'android' gyp backend. The WebView code is still built + # when this is unset, but builds using the normal chromium build system. + is_android_webview_build = false + } -if (is_android) { if (is_android_webview_build) { assert(android_src != "", "You must specify android_src for an Android WebView build.") @@ -26,8 +23,7 @@ if (is_android) { # android_ndk_root ----------------------------------------------------------- # Full system path to the Android NDK. - android_ndk_root = - rebase_path("//third_party/android_tools/ndk", ".", "") + android_ndk_root = rebase_path("//third_party/android_tools/ndk") # stlport stuff -------------------------------------------------------------- diff --git a/build/config/arm.gni b/build/config/arm.gni index b71ce3d..cf6619c 100644 --- a/build/config/arm.gni +++ b/build/config/arm.gni @@ -2,53 +2,56 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -declare_args() { - # Version of the ARM processor when compiling on ARM. Ignored on non-ARM - # platforms. - arm_version = 7 +if (cpu_arch == "arm") { + declare_args() { + # Version of the ARM processor when compiling on ARM. Ignored on non-ARM + # platforms. + arm_version = 7 - # The ARM floating point mode. This is either the string "hard", "soft", or - # "softfp". An empty string means to use the default one for the arm_version. - arm_float_abi = "" -} - -assert(arm_float_abi == "" || - arm_float_abi == "hard" || - arm_float_abi == "soft" || - arm_float_abi == "softfp") + # The ARM floating point mode. This is either the string "hard", "soft", or + # "softfp". An empty string means to use the default one for the + # arm_version. + arm_float_abi = "" + } -if (is_android) { - arm_use_neon = false - # Our version of arm_neon_optional from common.gypi. This is not used in the - # current build so is commented out for now. - #arm_optionally_use_neon = false -} else { - arm_use_neon = true - #arm_optionally_use_neon = true -} + assert(arm_float_abi == "" || + arm_float_abi == "hard" || + arm_float_abi == "soft" || + arm_float_abi == "softfp") -if (arm_version == 6) { - arm_arch = "armv6" - arm_tune = "" - if (arm_float_abi == "") { - arm_float_abi = "softfp" + if (is_android) { + arm_use_neon = false + # Our version of arm_neon_optional from common.gypi. This is not used in the + # current build so is commented out for now. + #arm_optionally_use_neon = false + } else { + arm_use_neon = true + #arm_optionally_use_neon = true } - arm_fpu = "vfp" - # Thumb is a reduced instruction set available on some ARM processors that - # has increased code density. - arm_use_thumb = false -} else if (arm_version == 7) { - arm_arch = "armv7-a" - arm_tune = "" - if (arm_float_abi == "") { - arm_float_abi = "softfp" - } - arm_use_thumb = true + if (arm_version == 6) { + arm_arch = "armv6" + arm_tune = "" + if (arm_float_abi == "") { + arm_float_abi = "softfp" + } + arm_fpu = "vfp" + # Thumb is a reduced instruction set available on some ARM processors that + # has increased code density. + arm_use_thumb = false - if (arm_use_neon) { - arm_fpu = "neon" - } else { - arm_fpu = "vfpv3-d16" + } else if (arm_version == 7) { + arm_arch = "armv7-a" + arm_tune = "" + if (arm_float_abi == "") { + arm_float_abi = "softfp" + } + arm_use_thumb = true + + if (arm_use_neon) { + arm_fpu = "neon" + } else { + arm_fpu = "vfpv3-d16" + } } } diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn index c3ee5da..a0392d2 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn @@ -4,7 +4,7 @@ declare_args() { # Indicates if the build should use the Chrome-specific plugins for enforcing - # coding guidelines, etc. + # coding guidelines, etc. Only used when compiling with Clang. clang_use_chrome_plugins = true } @@ -18,11 +18,11 @@ config("find_bad_constructs") { if (is_mac || is_ios) { cflags += [ rebase_path( "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib", - ".", root_build_dir) ] + root_build_dir) ] } else if (is_linux) { cflags += [ rebase_path( "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so", - ".", root_build_dir) ] + root_build_dir) ] } cflags += [ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index e1b73ee..7db12df 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -148,7 +148,7 @@ config("compiler") { if (cpu_arch == "x64") { # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of # address space, and it doesn't support cross-compiling). - gold_path = rebase_path("//third_party/gold", ".", root_build_dir) + gold_path = rebase_path("//third_party/gold", root_build_dir) ldflags += [ "-B$gold_path", diff --git a/build/config/ios/ios_sdk.gni b/build/config/ios/ios_sdk.gni index dce993d..e6c3e12 100644 --- a/build/config/ios/ios_sdk.gni +++ b/build/config/ios/ios_sdk.gni @@ -8,25 +8,20 @@ declare_args() { ios_sdk_path = "" # Set to true when targeting a simulator build on iOS. False means that the - # target is for running on the device. The default value (the empty string) - # means to pick the default based on the generator. - use_ios_simulator = "" + # target is for running on the device. The default value is to use the + # Simulator except when targeting GYP's Xcode builds (for compat with the + # existing GYP build). + use_ios_simulator = !is_gyp_xcode_generator # Version of iOS that we're targeting. ios_deployment_target = "6.0" } -if (use_ios_simulator == "") { - # Pick the default based on the generator. Currently, the Ninja build only - # supports the simulator, while we default to device builds on Xcode. - use_ios_simulator = !is_gyp_xcode_generator -} else { - # Simulator flag explicitly passed in. - if (!is_gyp_xcode_generator) { - # The Ninja build currently only targets the simulator. - assert(use_ios_simulator, - "You can't do an iOS device build using Ninja yet.") - } +# Simulator flag explicitly passed in. +if (!is_gyp_xcode_generator) { + # The Ninja build currently only targets the simulator. + assert(use_ios_simulator, + "You can't do an iOS device build using Ninja yet.") } if (ios_sdk_path == "") { diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn index 15b0c91..470922f 100644 --- a/build/config/linux/BUILD.gn +++ b/build/config/linux/BUILD.gn @@ -12,7 +12,7 @@ config("sdk") { # Need to get some linker flags out of the sysroot. ldflags += [ exec_script("sysroot_ld_path.py", - [ rebase_path("//build/linux/sysroot_ld_path.sh", ".", root_build_dir), + [ rebase_path("//build/linux/sysroot_ld_path.sh", root_build_dir), sysroot ], "value") ] } diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni index 6340c3a7..cecc1ea 100644 --- a/build/config/sysroot.gni +++ b/build/config/sysroot.gni @@ -24,18 +24,17 @@ if (is_android) { # For official builds, use the sysroot checked into the internal source repo # so that the builds work on older versions of Linux. if (cpu_arch == "x64") { - sysroot = rebase_path( - "//chrome/installer/linux/debian_wheezy_amd64-sysroot", ".", "") + sysroot = + rebase_path("//chrome/installer/linux/debian_wheezy_amd64-sysroot") } else if (cpu_arch == "x86") { - sysroot = rebase_path( - "//chrome/installer/linux/debian_wheezy_i386-sysroot", ".", "") + sysroot = rebase_path("//chrome/installer/linux/debian_wheezy_i386-sysroot") } else { # Any other builds don't use a sysroot. sysroot = "" } } else if (is_linux && !is_chromeos) { if (cpu_arch == "mipsel") { - sysroot = rebase_path("//mipsel-sysroot/sysroot", ".", "") + sysroot = rebase_path("//mipsel-sysroot/sysroot") } else { sysroot = "" } diff --git a/build/config/ui.gni b/build/config/ui.gni index b9969c0..08964df 100644 --- a/build/config/ui.gni +++ b/build/config/ui.gni @@ -10,42 +10,20 @@ # e.g. base, so they need to be global. declare_args() { - # True means the UI is built useing the "views" framework. - toolkit_views = false - # Indicates if Ash is enabled. Ash is the Aura SHell which provides a # desktop-like environment for Aura. Requires use_aura = true - use_ash = false - - # Indicates if Aura is enabled. Aura is a low-level windowing library, sort - # of a replacement for GDI or GTK. - use_aura = false + use_ash = is_win || is_chromeos # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux # that does not require X11. use_ozone = false -} - -if (is_win || is_chromeos) { - # Windows currelty implies Aura. - # TODO(brettw) bug 342937 move to declare_args block. - use_ash = true - use_aura = true -} - -if (is_linux || use_ozone) { - use_aura = true -} -if (!use_aura) { - use_ash = false # Ash needs Aura. -} + # Indicates if Aura is enabled. Aura is a low-level windowing library, sort + # of a replacement for GDI or GTK. + use_aura = is_linux || use_ozone || is_win || is_chromeos || use_ash -# TODO(brettw) bug 342937 move this to the declare_args block above when this -# is supported. It would look like: -# toolkit_views = is_win || is_chromeos || use_aura -if (is_win || is_chromeos || use_aura) { - toolkit_views = true + # True means the UI is built useing the "views" framework. + toolkit_views = is_win || is_chromeos || use_aura } # Additional dependent variables ----------------------------------------------- diff --git a/build/toolchain/clang.gni b/build/toolchain/clang.gni index 433ab32..861a681 100644 --- a/build/toolchain/clang.gni +++ b/build/toolchain/clang.gni @@ -3,6 +3,8 @@ # found in the LICENSE file. declare_args() { + # Enable the optional type profiler in Clang, which will tag heap allocations + # with the allocation type. use_clang_type_profiler = false } diff --git a/build/toolchain/get_default_posix_goma_dir.py b/build/toolchain/get_default_posix_goma_dir.py deleted file mode 100644 index 2aa0267..0000000 --- a/build/toolchain/get_default_posix_goma_dir.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2013 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. - -# This script returns the default goma directory for Posix systems, which is -# relative to the user's home directory. On Windows, goma.gypi hardcodes a -# value. - -import os - -print '"' + os.environ['HOME'] + '/goma"' diff --git a/build/toolchain/goma.gni b/build/toolchain/goma.gni index dca6a4d..1f34723 100644 --- a/build/toolchain/goma.gni +++ b/build/toolchain/goma.gni @@ -8,19 +8,16 @@ # people during the transition. declare_args() { + # Set to true to enable distributed compilation using Goma. use_goma = false - goma_dir = "" -} - -if (use_goma && goma_dir == "") { - # Set the default goma directory. This must be a character-for-character - # match for the GYP default or else the compilers for the different targets - # won't match and GYP will assert. + # Set the default value based on the platform. if (is_win) { - goma_dir = "c:\goma\goma-win" + # Absolute directory containing the Goma source code. + goma_dir = "C:\goma\goma-win" } else { - goma_dir = exec_script("get_default_posix_goma_dir.py", [], "value") + # Absolute directory containing the Goma source code. + goma_dir = getenv("HOME") + "/goma" } } diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn index 38f4b184..62e7278 100644 --- a/build/toolchain/linux/BUILD.gn +++ b/build/toolchain/linux/BUILD.gn @@ -61,10 +61,10 @@ gcc_toolchain("x86") { if (is_clang) { if (use_clang_type_profiler) { prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", - ".", root_build_dir) + root_build_dir) } else { prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - ".", root_build_dir) + root_build_dir) } cc = "$prefix/clang" cxx = "$prefix/clang++" @@ -84,10 +84,10 @@ gcc_toolchain("x64") { if (is_clang) { if (use_clang_type_profiler) { prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", - ".", root_build_dir) + root_build_dir) } else { prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", - ".", root_build_dir) + root_build_dir) } cc = "$prefix/clang" cxx = "$prefix/clang++" diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index afd09e0..35f80b0 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -15,8 +15,10 @@ import("//build/toolchain/clang.gni") import("//build/toolchain/goma.gni") if (is_clang) { - cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", root_build_dir) - cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", root_build_dir) + cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", + root_build_dir) + cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", + root_build_dir) # Set the GYP header for all toolchains when running under Clang. if (is_gyp) { @@ -50,7 +52,7 @@ ld = cxx # This will copy the gyp-mac-tool to the build directory. We pass in the source # file of the win tool. gyp_mac_tool_source = - rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", ".", root_build_dir) + rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir) exec_script("setup_toolchain.py", [ gyp_mac_tool_source ], "value") # Shared toolchain definition. Invocations should set toolchain_os to set the diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn index 1c1977b..c35ec45 100644 --- a/build/toolchain/win/BUILD.gn +++ b/build/toolchain/win/BUILD.gn @@ -14,7 +14,7 @@ import("//build/config/win/visual_studio_version.gni") # Its arguments are the VS path and the compiler wrapper tool. It will write # "environment.x86" and "environment.x64" to the build directory and return a # list to us. -gyp_win_tool_path = rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", +gyp_win_tool_path = rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir) exec_script("setup_toolchain.py", [ visual_studio_path, gyp_win_tool_path ], "string") diff --git a/build/util/BUILD.gn b/build/util/BUILD.gn index d43cc49..9275585 100644 --- a/build/util/BUILD.gn +++ b/build/util/BUILD.gn @@ -24,8 +24,8 @@ custom("last_change") { output_header = "$target_gen_dir/last_change.h"
outputs = [ output_header ]
- build_relative_src = rebase_path("//", ".", root_build_dir)
- build_relative_outputs = rebase_path(output_header, ".", root_build_dir)
+ build_relative_src = rebase_path("//", root_build_dir)
+ build_relative_outputs = rebase_path(output_header, root_build_dir)
args = [
"--source-dir=$build_relative_src",
diff --git a/tools/gn/bin/linux/gn.sha1 b/tools/gn/bin/linux/gn.sha1 index 5e276b3..7ab9462 100644 --- a/tools/gn/bin/linux/gn.sha1 +++ b/tools/gn/bin/linux/gn.sha1 @@ -1 +1 @@ -d270fc7aa2b7a6060fadde2b1e5b5038255a7559
\ No newline at end of file +5e091a30ac05dbbf99977d253ab51eaf4959e1a5
\ No newline at end of file diff --git a/tools/gn/bin/linux/gn32.sha1 b/tools/gn/bin/linux/gn32.sha1 index 64b7358..66cd7a2 100644 --- a/tools/gn/bin/linux/gn32.sha1 +++ b/tools/gn/bin/linux/gn32.sha1 @@ -1 +1 @@ -d2d73169ef4b2ad2e36cb583646e7a81d46039f5
\ No newline at end of file +b37f3698a39fc4ed4306d1562b25b9e1b59c89fc
\ No newline at end of file diff --git a/tools/gn/bin/mac/gn.sha1 b/tools/gn/bin/mac/gn.sha1 index bf6380c..da41a2b 100644 --- a/tools/gn/bin/mac/gn.sha1 +++ b/tools/gn/bin/mac/gn.sha1 @@ -1 +1 @@ -439fa6d584675085cfefa8a9575731eeedfcdd09 +f2a693592b8d143ed698f1cdf9d71316b248d087 diff --git a/tools/gn/bin/win/gn.exe.sha1 b/tools/gn/bin/win/gn.exe.sha1 index 710f6ad..1bb1ea0 100644 --- a/tools/gn/bin/win/gn.exe.sha1 +++ b/tools/gn/bin/win/gn.exe.sha1 @@ -1 +1 @@ -204fbe4079c1fe93569cd458cb6d75e4a8366f93 +2e3f8dbc942cac53fbec61d3a8f46a1ebd60d9a7 diff --git a/tools/gn/function_exec_script.cc b/tools/gn/function_exec_script.cc index 2109522..4178925 100644 --- a/tools/gn/function_exec_script.cc +++ b/tools/gn/function_exec_script.cc @@ -278,9 +278,9 @@ const char kExecScript_Help[] = "\n" "Example:\n" "\n" - " all_lines = exec_script(\"myscript.py\", [some_input], \"list lines\",\n" - " [ rebase_path(\"data_file.txt\", \".\"," - " root_build_dir) ])\n" + " all_lines = exec_script(\n" + " \"myscript.py\", [some_input], \"list lines\",\n" + " [ rebase_path(\"data_file.txt\", root_build_dir) ])\n" "\n" " # This example just calls the script with no arguments and discards\n" " # the result.\n" diff --git a/tools/gn/secondary/chrome/BUILD.gn b/tools/gn/secondary/chrome/BUILD.gn index 034ba04..ff72231 100644 --- a/tools/gn/secondary/chrome/BUILD.gn +++ b/tools/gn/secondary/chrome/BUILD.gn @@ -186,7 +186,7 @@ source_set("utility") { about_credits_file = "$root_gen_dir/about_credits.html" build_relative_about_credits_file = - rebase_path(about_credits_file, ".", root_build_dir) + rebase_path(about_credits_file, root_build_dir) custom("about_credits") { script = "//tools/licenses.py" diff --git a/tools/gn/secondary/device/usb/BUILD.gn b/tools/gn/secondary/device/usb/BUILD.gn index afe95dc..2d0c7d8 100644 --- a/tools/gn/secondary/device/usb/BUILD.gn +++ b/tools/gn/secondary/device/usb/BUILD.gn @@ -19,7 +19,7 @@ custom("device_usb_ids") { source_prereqs = [ source_ids ]
outputs = [ generated_ids ]
args = [
- "-i", rebase_path(source_ids, ".", root_build_dir),
- "-o", rebase_path(generated_ids, ".", root_build_dir),
+ "-i", rebase_path(source_ids, root_build_dir),
+ "-o", rebase_path(generated_ids, root_build_dir),
]
}
diff --git a/tools/gn/secondary/tools/grit/grit_rule.gni b/tools/gn/secondary/tools/grit/grit_rule.gni index 735a4da..06cee4a 100644 --- a/tools/gn/secondary/tools/grit/grit_rule.gni +++ b/tools/gn/secondary/tools/grit/grit_rule.gni @@ -24,9 +24,9 @@ template("grit") { # These are all passed as arguments to the script so have to be relative to # the build directory. resource_ids = - rebase_path("//tools/gritsettings/resource_ids", ".", root_build_dir) - output_dir = rebase_path(target_gen_dir, ".", root_build_dir) - source_path = rebase_path(source, ".", root_build_dir) + rebase_path("//tools/gritsettings/resource_ids", root_build_dir) + output_dir = rebase_path(target_gen_dir, root_build_dir) + source_path = rebase_path(source, root_build_dir) if (!defined(grit_flags)) { grit_flags = [] # These are optional so default to empty list. @@ -36,7 +36,7 @@ template("grit") { [ "--inputs", source_path, "-f", resource_ids] + grit_flags, "list lines") # The inputs are relative to the current (build) directory, rebase to # the current one. - grit_inputs = rebase_path(grit_inputs_build_rel, root_build_dir, ".") + grit_inputs = rebase_path(grit_inputs_build_rel, root_build_dir) grit_outputs_build_rel = exec_script(grit_info_script, [ "--outputs", "$output_dir", source_path, "-f", resource_ids ] + @@ -44,7 +44,7 @@ template("grit") { "list lines") # The inputs are relative to the current (build) directory, rebase to # the current one. - grit_outputs = rebase_path(grit_outputs_build_rel, root_build_dir, ".") + grit_outputs = rebase_path(grit_outputs_build_rel, root_build_dir) # The current grit setup makes an file in $target_gen_dir/grit/foo.h that # the source code expects to include via "grit/foo.h". It would be nice to diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc index 4182c20..782109f 100644 --- a/tools/gn/variables.cc +++ b/tools/gn/variables.cc @@ -183,7 +183,7 @@ const char kRootOutDir_Help[] = "\n" " custom(\"myscript\") {\n" " # Pass the output dir to the script.\n" - " args = [ \"-o\", rebase_path(root_out_dir, \".\", root_build_dir) ]\n" + " args = [ \"-o\", rebase_path(root_out_dir, root_build_dir) ]\n" " }\n"; const char kTargetGenDir[] = "target_gen_dir"; @@ -208,7 +208,7 @@ const char kTargetGenDir_Help[] = "\n" " custom(\"myscript\") {\n" " # Pass the generated output dir to the script.\n" - " args = [ \"-o\", rebase_path(target_gen_dir, \".\", root_build_dir) ]" + " args = [ \"-o\", rebase_path(target_gen_dir, root_build_dir) ]" "\n" " }\n"; @@ -234,7 +234,7 @@ const char kTargetOutDir_Help[] = "\n" " custom(\"myscript\") {\n" " # Pass the output dir to the script.\n" - " args = [ \"-o\", rebase_path(target_out_dir, \".\", root_build_dir) ]" + " args = [ \"-o\", rebase_path(target_out_dir, root_build_dir) ]" "\n" " }\n"; |