From b9b34ded1a2e6e5ed8637fac996e0f8bd67ad417 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 18 Aug 2017 14:05:56 -0700 Subject: [PATCH] Changes required by the clang-6.0 toolchain (#93) --- build/config/compiler/BUILD.gn | 5 +++++ build/toolchain/android/BUILD.gn | 8 ++++---- build/toolchain/linux/BUILD.gn | 4 ++-- build/toolchain/mac/BUILD.gn | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 56f67122d8cd9..b5855d4dd5d1a 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -616,6 +616,11 @@ if (is_win) { # Disables. "-Wno-missing-field-initializers", # "struct foo f = {0};" "-Wno-unused-parameter", # Unused function parameters. + + # TODO(jsimmons): This is needed for building Flutter's current version of + # third_party/icu with the clang-6.0 toolchain. Remove this when we upgrade + # to a more recent version of ICU. + "-Wno-enum-compare-switch", ] if (is_mac) { diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn index 90e1256da8018..1ae04b903814a 100644 --- a/build/toolchain/android/BUILD.gn +++ b/build/toolchain/android/BUILD.gn @@ -47,16 +47,16 @@ template("android_gcc_toolchain") { is_clang = invoker.is_clang if (is_clang) { - host_suffix = "" + host_dir = "" if (host_os == "linux") { - host_suffix = "x86_64-linux" + host_dir = "linux-x64" } else if (host_os == "mac") { - host_suffix = "x86_64-darwin" + host_dir = "mac-x64" } else { assert(false, "Unknown host") } - prefix = rebase_path("//buildtools/toolchain/clang+llvm-$host_suffix/bin", + prefix = rebase_path("//buildtools/$host_dir/clang/bin", root_build_dir) cc = compiler_prefix + prefix + "/clang" diff --git a/build/toolchain/linux/BUILD.gn b/build/toolchain/linux/BUILD.gn index fbe299513680c..508c12980ed66 100644 --- a/build/toolchain/linux/BUILD.gn +++ b/build/toolchain/linux/BUILD.gn @@ -36,7 +36,7 @@ gcc_toolchain("clang_x86") { prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin", root_build_dir) } else { - prefix = rebase_path("//buildtools/toolchain/clang+llvm-x86_64-linux/bin", + prefix = rebase_path("//buildtools/linux-x64/clang/bin", root_build_dir) } cc = "${compiler_prefix}$prefix/clang" @@ -71,7 +71,7 @@ gcc_toolchain("clang_x64") { prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin", root_build_dir) } else { - prefix = rebase_path("//buildtools/toolchain/clang+llvm-x86_64-linux/bin", + prefix = rebase_path("//buildtools/linux-x64/clang/bin", root_build_dir) } cc = "${compiler_prefix}$prefix/clang" diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index 79665cd6e1ac1..218c3c479b341 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -215,7 +215,7 @@ template("mac_toolchain") { } } -llvm_bin_path = "//buildtools/toolchain/clang+llvm-x86_64-darwin/bin" +llvm_bin_path = "//buildtools/toolchain/mac-x64/clang/bin" # Toolchain used for iOS device targets. mac_toolchain("ios_clang_arm") {