Skip to content

Commit 25381db

Browse files
JeevakaPrabuXinfengZhang
authored andcommitted
Update Android.bp to generate va_version.h and build only for x86_64
Changes include: - Updated Android.bp to add license package and enable it only for x86_64 - Added genrule to generate the va_version.h. - Removed va_version.h Signed-off-by: JeevakaPrabu <jeevaka.badrappan@intel.com> Signed-off-by: Andreas Huber <andih@google.com>
1 parent c5b3926 commit 25381db

2 files changed

Lines changed: 63 additions & 111 deletions

File tree

Android.bp

Lines changed: 63 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,38 @@
1818
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
// SOFTWARE.
2020

21+
package {
22+
default_applicable_licenses: ["external_intel_libva_license"],
23+
}
24+
25+
license {
26+
name: "external_intel_libva_license",
27+
visibility: [":__subpackages__"],
28+
license_text: [
29+
"COPYING",
30+
],
31+
}
32+
33+
sh_binary_host {
34+
name: "libva_gen_version_script",
35+
src: "build/gen_version.sh",
36+
}
37+
38+
genrule {
39+
name: "libva_gen_version",
40+
srcs: [
41+
"configure.ac",
42+
"va/va_version.h.in",
43+
],
44+
tools: [
45+
"libva_gen_version_script",
46+
],
47+
out: ["va/va_version.h"],
48+
cmd: "$(location libva_gen_version_script) " +
49+
"$$(dirname $(location configure.ac)) " +
50+
"$(location va/va_version.h.in) > $(out)",
51+
}
52+
2153
cc_library_headers {
2254
name: "libva_headers",
2355

@@ -27,7 +59,20 @@ cc_library_headers {
2759
"va/drm"
2860
],
2961

62+
generated_headers: [
63+
"libva_gen_version",
64+
],
65+
export_generated_headers: [
66+
"libva_gen_version",
67+
],
68+
3069
vendor: true,
70+
enabled: false,
71+
arch: {
72+
x86_64: {
73+
enabled: true,
74+
},
75+
},
3176
}
3277

3378
cc_library_shared {
@@ -41,16 +86,18 @@ cc_library_shared {
4186
],
4287

4388
local_include_dirs: [
44-
".",
4589
"va"
4690
],
4791

48-
header_libs: [
49-
"libutils_headers",
92+
generated_headers: [
93+
"libva_gen_version",
94+
],
95+
export_generated_headers: [
96+
"libva_gen_version",
5097
],
5198

52-
export_include_dirs: [
53-
".",
99+
header_libs: [
100+
"liblog_headers",
54101
],
55102

56103
srcs: [
@@ -64,30 +111,25 @@ cc_library_shared {
64111

65112
cflags: [
66113
"-Werror",
67-
"-Wno-error",
114+
"-Winvalid-pch",
68115
"-DSYSCONFDIR=\"/vendor/etc\"",
69116
"-DLOG_TAG=\"libva\"",
70117
],
71118

72119
arch: {
73-
x86: {
74-
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib\""],
75-
},
76120
x86_64: {
77121
cflags: ["-DVA_DRIVERS_PATH=\"/vendor/lib64\""],
122+
enabled: true,
78123
},
79124
},
80125

81126
vendor: true,
127+
enabled: false,
82128
}
83129

84130
cc_library_shared {
85131
name: "libva-android",
86132

87-
static_libs: [
88-
"libarect",
89-
],
90-
91133
shared_libs: [
92134
"libva",
93135
"libdrm",
@@ -99,24 +141,22 @@ cc_library_shared {
99141
"va/drm",
100142
],
101143

102-
header_libs: [
103-
"libnativebase_headers",
104-
"libutils_headers",
105-
],
106-
107-
include_dirs: [
108-
],
109-
110144
srcs: [
111145
"va/android/va_android.cpp",
112146
"va/drm/va_drm_utils.c",
113147
],
114148

115149
cflags: [
116-
"-Wall",
117150
"-Werror",
118-
"-Wno-error",
151+
"-Winvalid-pch",
152+
"-DLOG_TAG=\"libva-android\"",
119153
],
120154

121155
vendor: true,
156+
enabled: false,
157+
arch: {
158+
x86_64: {
159+
enabled: true,
160+
},
161+
},
122162
}

va/va_version.h

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)