Skip to content

Commit

Permalink
Windows, native: add windows_msvc config_setting
Browse files Browse the repository at this point in the history
Update `select` statements in BUILD files with the
new config_setting.

This is a first step on a long path that leads to
us being able to compile bazel on Windows with
--cpu=x64_windows_msvc. Needless to say, we're not
there yet.

Tested: on Linux, Darwin, Windows/MSYS

--
MOS_MIGRATED_REVID=134534613
  • Loading branch information
laszlocsomor authored and meteorcloudy committed Sep 28, 2016
1 parent ad1a77e commit 8896dad
Show file tree
Hide file tree
Showing 9 changed files with 812 additions and 7 deletions.
1 change: 1 addition & 0 deletions scripts/packages/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ filegroup(
name = "packages",
srcs = select({
"//src:windows": [],
"//src:windows_msvc": [],
"//src:darwin": [
":install.sh",
":generate-package-info",
Expand Down
7 changes: 7 additions & 0 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ filegroup(
":darwin": ["//src/main/native:libunix.dylib"],
":darwin_x86_64": ["//src/main/native:libunix.dylib"],
":windows": ["//src/main/native:windows_jni.dll"],
":windows_msvc": ["//src/main/native:windows_jni.dll"],
"//conditions:default": ["//src/main/native:libunix.so"],
}),
visibility = [
Expand Down Expand Up @@ -273,6 +274,12 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "windows_msvc",
values = {"cpu": "x64_windows_msvc"},
visibility = ["//visibility:public"],
)

filegroup(
name = "srcs",
srcs = glob(["**"]) + [
Expand Down
3 changes: 3 additions & 0 deletions src/main/cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ cc_library(
"//src:windows": [
"blaze_util_mingw.cc",
],
"//src:windows_msvc": [
"blaze_util_msvc.cc",
],
"//conditions:default": [
"blaze_util_linux.cc",
"blaze_util_posix.cc",
Expand Down
Loading

0 comments on commit 8896dad

Please sign in to comment.