Commit d1b532dc authored by Hans Wennborg's avatar Hans Wennborg

Fix -flax-vector-conversions for Windows and CrOS

clang-cl doesn't recognize the flag as it is.

CrOS doesn't know the flag. While that's not relevant for the ToT bots,
it makes sense to handle it already, to make it easier when we roll Clang.

Bug: 1042470
Change-Id: I3ae6476be2d2031f92a6c6613aa2138eba76fe9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003133Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732390}
parent 66995237
......@@ -6,6 +6,7 @@ import("//build/config/android/config.gni")
import("//build/config/c++/c++.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/chromeos/args.gni")
import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/coverage/coverage.gni")
......@@ -512,7 +513,11 @@ config("compiler") {
# Before Clang 10, lax vector conversions were allowed by default.
# Chromium currently relies on this behavior.
# TODO(crbug.com/1042470): Fix the code and remove this flag.
cflags += [ "-flax-vector-conversions=all" ]
if (is_win) {
cflags += [ "/clang:-flax-vector-conversions=all" ]
} else if (cros_sdk_version == "") {
cflags += [ "-flax-vector-conversions=all" ]
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment