aboutsummaryrefslogtreecommitdiffhomepage
path: root/farmhash.BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'farmhash.BUILD')
-rw-r--r--farmhash.BUILD13
1 files changed, 13 insertions, 0 deletions
diff --git a/farmhash.BUILD b/farmhash.BUILD
index 8111cd61f9..b41c799f8f 100644
--- a/farmhash.BUILD
+++ b/farmhash.BUILD
@@ -1,9 +1,22 @@
licenses(["notice"]) # MIT
+config_setting(
+ name = "windows",
+ values = {
+ "cpu": "x64_windows_msvc",
+ },
+)
+
+
cc_library(
name = "farmhash",
srcs = ["farmhash.cc"],
hdrs = ["farmhash.h"],
+ # Disable __builtin_expect support on Windows
+ copts = select({
+ ":windows" : ["/DFARMHASH_OPTIONAL_BUILTIN_EXPECT"],
+ "//conditions:default" : [],
+ }),
includes = ["."],
visibility = ["//visibility:public"],
)