diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-23 05:11:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-23 05:11:32 +0000 |
commit | 9682d68a2d4e1158126c992a1fd42a445b246f1d (patch) | |
tree | ce5d1764b453e747141ac8a57b8ffc577cb61a20 /build | |
parent | b000edf932ccdf22ed58ec0905bd4befecb1832c (diff) | |
download | chromium_src-9682d68a2d4e1158126c992a1fd42a445b246f1d.zip chromium_src-9682d68a2d4e1158126c992a1fd42a445b246f1d.tar.gz chromium_src-9682d68a2d4e1158126c992a1fd42a445b246f1d.tar.bz2 |
Add GN conversions for flags
Adds a remapping from important GYP flags used on the main waterfall for GN. For the other ones, I added a list of used flags and filed bugs for them.
R=scottmg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/119803002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/config/BUILDCONFIG.gn | 20 | ||||
-rwxr-xr-x | build/gyp_chromium | 25 | ||||
-rw-r--r-- | build/toolchain/mac/BUILD.gn | 2 |
3 files changed, 45 insertions, 2 deletions
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 9e5f109..dd1d276 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -65,6 +65,18 @@ declare_args() { # true means official Google Chrome branding (requires extra Google-internal # resources). is_chrome_branded = false + + # Compile for Address Sanitizer to find memory bugs. + is_asan = false + + # Compile for Leak Sanitizer to find leaks. + is_lsan = false + + # Compile for Memory Sanitizer to find uninitialized reads. + is_msan = false + + # Compile for Thread Sanitizer to find threading bugs. + is_tsan = false } # ============================================================================= @@ -280,6 +292,12 @@ if (is_component_build) { component_mode = "static_library" } +# These Sanitizers all imply using the Clang compiler. On Windows they either +# don't work or work differently. +if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) { + is_clang = true +} + toolkit_uses_gtk = is_linux # ============================================================================= @@ -422,7 +440,7 @@ if (is_win) { } else if (build_cpu_arch == "x64") { set_default_toolchain("//build/toolchain/linux:64") } -} else if (is_mac) { +} else if (is_mac || is_ios) { host_toolchain = "//build/toolchain/mac:clang" set_default_toolchain(host_toolchain) } diff --git a/build/gyp_chromium b/build/gyp_chromium index 9818721..32cb491 100755 --- a/build/gyp_chromium +++ b/build/gyp_chromium @@ -115,6 +115,19 @@ def GetArgsStringForGN(supplemental_files): vars_dict = GetGypVarsForGN(supplemental_files) gn_args = '' + # Note: These are the additional flags passed to various builds by builders + # on the main waterfall. We'll probably need to add these at some point: + # mac_strip_release=1 http://crbug.com/330301 + # linux_dump_symbols=0 http://crbug.com/330300 + # host_os=linux Probably can skip, GN knows the host OS. + # gcc_version=46 Hopefully we can skip this and fix whatever uses it. + # order_text_section=<path> http://crbug.com/330299 + # chromium_win_pch=0 http://crbug.com/297678 + # clang_use_chrome_plugins=1 http://crbug.com/330298 + # chromium_ios_signing=0 http://crbug.com/330302 + # linux_use_tcmalloc=0 http://crbug.com/330303 + # release_extra_flags=... http://crbug.com/330305 + # These tuples of (key, value, gn_arg_string) use the gn_arg_string for # gn when the key is set to the given value in the GYP arguments. remap_cases = [ @@ -122,6 +135,18 @@ def GetArgsStringForGN(supplemental_files): ('buildtype', 'Official', 'is_official_build=true'), ('component', 'shared_library', 'is_component_build=true'), ('clang', '1', 'is_clang=true'), + ('target_arch', 'ia32', 'cpu_arch="x86"'), + ('target_arch', 'x64', 'cpu_arch="x64"'), + ('target_arch', 'arm', 'cpu_arch="arm"'), + ('fastbuild', '0', 'symbol_level=2'), + ('fastbuild', '1', 'symbol_level=1'), + ('fastbuild', '2', 'symbol_level=0'), + ('OS', 'ios', 'os="ios"'), + ('OS', 'android', 'os="android"'), + ('chromeos', '1', 'os="chromeos"'), + ('use_aura', '1', 'use_aura=true'), + ('asan', '1', 'is_asan=true'), + ('lsan', '1', 'is_lsan=true'), ] for i in remap_cases: if i[0] in vars_dict and vars_dict[i[0]] == i[1]: diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index b8a3c5e..4150ae6 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. # Should only be running on Mac. -assert(is_mac) +assert(is_mac || is_ios) 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) |