blob: 6fcbcab94dae8023e6b5449a42d815db80b7aa03 [file] [log] [blame]
Kristina Chodorowb5ecdab2015-03-16 17:55:04 +00001package(default_visibility = ["//visibility:public"])
2
3filegroup(
4 name = "jni_header",
5 srcs = ["include/jni.h"],
6)
7
8filegroup(
9 name = "jni_md_header-darwin",
10 srcs = ["include/darwin/jni_md.h"],
11)
12
13filegroup(
14 name = "jni_md_header-linux",
15 srcs = ["include/linux/jni_md.h"],
16)
17
18filegroup(
Doug Rabson709bc612015-08-25 14:12:00 +000019 name = "jni_md_header-freebsd",
20 srcs = ["include/freebsd/jni_md.h"],
21)
22
23filegroup(
Kristina Chodorowb5ecdab2015-03-16 17:55:04 +000024 name = "java",
Dmitry Lomov14c49ac2016-02-12 14:00:26 +000025 srcs = select({
26 ":windows" : ["bin/java.exe"],
27 "//conditions:default" : ["bin/java"],
28 }),
Kristina Chodorowb5ecdab2015-03-16 17:55:04 +000029)
30
Han-Wen Nienhuyse01aa682015-06-01 15:57:50 +000031filegroup(
32 name = "jar",
Dmitry Lomov14c49ac2016-02-12 14:00:26 +000033 srcs = select({
34 ":windows" : ["bin/jar.exe"],
35 "//conditions:default" : ["bin/jar"],
36 }),
Han-Wen Nienhuyse01aa682015-06-01 15:57:50 +000037)
38
Damien Martin-Guillerez0bf90f72015-06-11 09:20:59 +000039filegroup(
40 name = "javac",
Dmitry Lomov14c49ac2016-02-12 14:00:26 +000041 srcs = select({
42 ":windows" : ["bin/javac.exe"],
43 "//conditions:default" : ["bin/javac"],
44 }),
Damien Martin-Guillerez0bf90f72015-06-11 09:20:59 +000045)
46
Dmitry Lomov14c49ac2016-02-12 14:00:26 +000047
Alpha Lam234cc162015-12-02 09:32:38 +000048filegroup(
49 name = "xjc",
50 srcs = ["bin/xjc"],
51)
52
53filegroup(
54 name = "wsimport",
55 srcs = ["bin/wsimport"],
56)
57
Kristina Chodorowb5ecdab2015-03-16 17:55:04 +000058BOOTCLASS_JARS = [
59 "rt.jar",
60 "resources.jar",
61 "jsse.jar",
62 "jce.jar",
63 "charsets.jar",
64]
65
66filegroup(
67 name = "bootclasspath",
68 srcs = ["jre/lib/%s" % jar for jar in BOOTCLASS_JARS],
69)
70
71filegroup(
Liam Miller-Cushon22218602015-05-19 17:23:01 +000072 name = "extdir",
73 srcs = glob(["jre/lib/ext/*.jar"]),
74)
75
76filegroup(
Philipp Wollermannc8db70c2015-08-21 13:35:10 +000077 name = "jre-bin",
Yun Peng83781f72016-04-13 15:58:19 +000078 srcs = select({
79 # In some configurations, Java browser plugin is considered harmful and
80 # common antivirus software blocks access to npjp2.dll interfering with Bazel,
81 # so do not include it in JRE on Windows.
82 ":windows" : glob(["jre/bin/**"], exclude = ["jre/bin/plugin2/**"]),
83 "//conditions:default" : glob(["jre/bin/**"])
84 }),
Philipp Wollermannc8db70c2015-08-21 13:35:10 +000085)
86
87filegroup(
88 name = "jre-lib",
89 srcs = glob(["jre/lib/**"]),
90)
91
92filegroup(
Ulf Adams27085f42016-10-06 08:51:47 +000093 name = "jre",
94 srcs = [":jre-default"],
95)
96
97filegroup(
Philipp Wollermannc8db70c2015-08-21 13:35:10 +000098 name = "jre-default",
99 srcs = [
100 ":jre-bin",
101 ":jre-lib",
102 ],
103)
104
105filegroup(
106 name = "jdk-bin",
Lukacs Berki3b58ea92016-02-24 14:57:07 +0000107 srcs = glob(
108 ["bin/**"],
109 # The JDK on Windows sometimes contains a directory called
110 # "%systemroot%", which is not a valid label.
111 exclude = ["**/*%*/**"]),
Philipp Wollermannc8db70c2015-08-21 13:35:10 +0000112)
113
114filegroup(
115 name = "jdk-include",
116 srcs = glob(["include/**"]),
117)
118
119filegroup(
120 name = "jdk-lib",
121 srcs = glob(
122 ["lib/**"],
Lukacs Berki3b58ea92016-02-24 14:57:07 +0000123 exclude = [
Philipp Wollermannc8db70c2015-08-21 13:35:10 +0000124 "lib/missioncontrol/**",
125 "lib/visualvm/**",
126 ]),
127)
128
Ulf Adams27085f42016-10-06 08:51:47 +0000129# Bazel looks for a label ending in -<cpu>, or -default if it can't find one.
130filegroup(
131 name = "jdk",
132 srcs = [
133 ":jdk-default",
134 ],
135)
136
Philipp Wollermannc8db70c2015-08-21 13:35:10 +0000137filegroup(
Kristina Chodorowb5ecdab2015-03-16 17:55:04 +0000138 name = "jdk-default",
Philipp Wollermannc8db70c2015-08-21 13:35:10 +0000139 srcs = [
140 ":jdk-bin",
141 ":jdk-include",
142 ":jdk-lib",
143 ":jre-default",
144 ],
Kristina Chodorowb5ecdab2015-03-16 17:55:04 +0000145)
Damien Martin-Guillerez351e9db2015-06-19 10:51:21 +0000146
147filegroup(
148 name = "langtools",
149 srcs = ["lib/tools.jar"],
150)
151
152java_import(
153 name = "langtools-neverlink",
154 jars = ["lib/tools.jar"],
155 neverlink = 1,
156)
Dmitry Lomov14c49ac2016-02-12 14:00:26 +0000157
158config_setting(
159 name = "windows",
160 values = {"cpu": "x64_windows"},
161 visibility = ["//visibility:private"],
162)