diff options
author | benoitjacob <benoitjacob@google.com> | 2020-05-30 15:17:49 +0300 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2020-05-30 15:53:32 +0300 |
commit | 7735934d065b59fc58dc3715bdf7800fe60daffe (patch) | |
tree | c8983b22e8c7fc5c3baee486354dfc40d95fef33 | |
parent | f8c014472d9da9a776490794e3066b153927ff99 (diff) |
Bump the ruy repository reference.test_313928014
PiperOrigin-RevId: 313928014
-rw-r--r-- | ruy/BUILD | 7 | ||||
-rw-r--r-- | ruy/build_defs.bzl | 23 |
2 files changed, 20 insertions, 10 deletions
@@ -32,6 +32,11 @@ config_setting( ) config_setting( + name = "windows", + flag_values = {"//tools/cpp:cc_target_os": "windows"}, +) + +config_setting( name = "optimized", values = { "compilation_mode": "opt", @@ -944,7 +949,7 @@ cc_library( # need defines, not copts, because it's controlling a header, test.h defines = ruy_test_ext_defines(), linkopts = select({ - "@bazel_tools//src/conditions:windows": [], + ":windows": [], "//conditions:default": ["-lm"], }), deps = [ diff --git a/ruy/build_defs.bzl b/ruy/build_defs.bzl index 4b53c38..0211cfa 100644 --- a/ruy/build_defs.bzl +++ b/ruy/build_defs.bzl @@ -3,18 +3,23 @@ # Helper for ruy_copts(). # Returns warnings flags to use for all ruy code. def ruy_copts_warnings(): - return [ - # TensorFlow is C++14 at the moment. - "-Wc++14-compat", - # Warn on preprocessor expansion of an undefined token, e.g. catching typos - # such as `#ifdef __linus__` instead of `#ifdef __linux__`. - "-Wundef", - ] + select({ - # We run into trouble on some Windows clang toolchains with -Wextra. - "@bazel_tools//src/conditions:windows": [], + return select({ + "//ruy:windows": [ + # We run into trouble on Windows toolchains with warning flags: + # - Some clang-based toolchains have more warnings enabled in -Wextra. + # - MSVC does not like -Wc++14-compat + # We could be more aggressive in enabling supported warnings on each + # Windows toolchain, but we compromise with keeping BUILD files simple + # by limiting the number of config_setting's. + ], "//conditions:default": [ "-Wall", "-Wextra", + # TensorFlow is C++14 at the moment. + "-Wc++14-compat", + # Warn on preprocessor expansion of an undefined token, e.g. catching typos + # such as `#ifdef __linus__` instead of `#ifdef __linux__`. + "-Wundef", ], }) |