aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/native
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2017-07-04 05:45:40 -0400
committerGravatar John Cater <jcater@google.com>2017-07-05 10:57:51 -0400
commit9409109c3016c51403ed4387ecda6c99459f1a8d (patch)
treea4df58dec6aa7990bf7280785b63abfe9840da03 /src/main/native
parent6c446ac82a23bd803a4881ac84e427325db15e69 (diff)
build_windows_jni.sh: move file to subdirectory
The script more logically belongs in src/main/native/windows than in src/main/native. Also move the //src/main/native:windows_jni rule into //src/main/native/windows:windows_jni, so the logic of building the JNI library is fully contained in that package. Change-Id: I96e19003932cc0ddc5af3471b0b31a1aec09b8fa PiperOrigin-RevId: 160876594
Diffstat (limited to 'src/main/native')
-rw-r--r--src/main/native/BUILD10
-rw-r--r--src/main/native/windows/BUILD28
-rwxr-xr-xsrc/main/native/windows/build_windows_jni.sh (renamed from src/main/native/build_windows_jni.sh)0
3 files changed, 17 insertions, 21 deletions
diff --git a/src/main/native/BUILD b/src/main/native/BUILD
index 59eaf02cb6..c4b0d2ee3b 100644
--- a/src/main/native/BUILD
+++ b/src/main/native/BUILD
@@ -62,16 +62,6 @@ cc_binary(
],
)
-genrule(
- name = "windows_jni",
- srcs = ["//src/main/native/windows:raw-sources"],
- outs = ["windows_jni.dll"],
- cmd = "$(location build_windows_jni.sh) $@ $(SRCS)",
- output_to_bindir = 1,
- tools = ["build_windows_jni.sh"],
- visibility = ["//src:__subpackages__"],
-)
-
# TODO(bazel-team): Come up with a way to support platform-specific dynamic
# library extensions. This is issue #914.
genrule(
diff --git a/src/main/native/windows/BUILD b/src/main/native/windows/BUILD
index c7dead2469..926643c878 100644
--- a/src/main/native/windows/BUILD
+++ b/src/main/native/windows/BUILD
@@ -6,8 +6,8 @@ filegroup(
visibility = ["//src/main/native:__pkg__"],
)
-# TODO(xingao): verify that this filegroup contains exactly what it has to wrt.
-# where it is used (//src/main/native:embedded_tools).
+# TODO(xingao): verify that this filegroup contains exactly what it has to, with
+# regard to where it is used (//src/main/native:embedded_tools).
# Context: https://github.com/bazelbuild/bazel/commit/33d05f6b551cf2fdb257cb536a5e864d095144a1
filegroup(
name = "embedded_tools",
@@ -15,15 +15,6 @@ filegroup(
visibility = ["//src/main/native:__pkg__"],
)
-filegroup(
- name = "raw-sources",
- srcs = glob([
- "*.cc",
- "*.h",
- ]),
- visibility = ["//src/main/native:__pkg__"],
-)
-
cc_library(
name = "lib-file",
srcs = ["file.cc"],
@@ -41,3 +32,18 @@ cc_library(
srcs = ["util.cc"],
hdrs = ["util.h"],
)
+
+genrule(
+ name = "windows_jni",
+ srcs = glob([
+ "*.cc",
+ "*.h",
+ ]),
+ outs = ["windows_jni.dll"],
+ cmd = "$(location build_windows_jni.sh) $@ $(SRCS)",
+ tools = ["build_windows_jni.sh"],
+ visibility = [
+ "//src:__pkg__",
+ "//src/test/java/com/google/devtools/build/lib:__subpackages__",
+ ],
+)
diff --git a/src/main/native/build_windows_jni.sh b/src/main/native/windows/build_windows_jni.sh
index a66267814a..a66267814a 100755
--- a/src/main/native/build_windows_jni.sh
+++ b/src/main/native/windows/build_windows_jni.sh