Skip to content

Commit

Permalink
Changes required by the clang-6.0 toolchain (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Aug 18, 2017
1 parent 56682b0 commit b9b34de
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions build/toolchain/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions build/toolchain/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion build/toolchain/mac/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit b9b34de

Please sign in to comment.