Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 026a5b3

Browse files
Update to Halide 2017/05/03 release; fix Android link opts
1 parent f8614ff commit 026a5b3

File tree

4 files changed

+29
-18
lines changed

4 files changed

+29
-18
lines changed

example/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
git_repository(
22
name = "halide_bazel",
33
remote = "https://github.com/halide/halide_bazel",
4-
tag = "v0.1.6"
4+
tag = "v0.1.7"
55
)
66
load("@halide_bazel//:halide_configure.bzl", "halide_configure")
77
halide_configure()

example/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ int main(int argc, char **argv) {
88
constexpr int kEdge = 30;
99
constexpr float kMax = kEdge * kEdge;
1010

11-
Halide::Buffer<float> input(kEdge, kEdge);
11+
Halide::Runtime::Buffer<float> input(kEdge, kEdge);
1212
for (int x = 0; x < kEdge; ++x) {
1313
for (int y = 0; y < kEdge; ++y) {
1414
input(x, y) = static_cast<float>(x + y) / kMax;
1515
}
1616
}
1717

1818
const float kScale = 0.5f;
19-
Halide::Buffer<float> output(kEdge, kEdge);
19+
Halide::Runtime::Buffer<float> output(kEdge, kEdge);
2020
int result = example(input, kScale, output);
2121
if (result != 0) {
2222
fprintf(stderr, "Failure: %d\n", result);

halide_configure.bzl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ _HOST_DEFAULTS_DARWIN = {
1919
"copts": _COPTS_DEFAULT,
2020
"linkopts": _LINKOPTS_DEFAULT,
2121
"http_archive_info": [
22-
"https://github.com/halide/Halide/releases/download/release_2016_10_25/halide-mac-64-trunk-aa5d5514f179bf0ffe1a2dead0c0eb7300b4069a.tgz",
23-
"7cc502ebeabd1890f9ab12c186e59745c9f524ce74b325931103ef7a1136ca2a",
22+
"https://github.com/halide/Halide/releases/download/release_2017_05_03/halide-mac-64-trunk-06ace54101cbd656e22243f86cce0a82ba058c3b.tgz",
23+
"8c8a5e005991265311554d33e0d91b988e2a7083f6f250bbc0180e5b292b19b1",
2424
]
2525
}
2626

@@ -30,8 +30,8 @@ _HOST_DEFAULTS_PIII = {
3030
"linkopts": _LINKOPTS_DEFAULT,
3131
"http_archive_info": [
3232
# TODO: we default to gcc4.8 on Linux; is this the best choice?
33-
"https://github.com/halide/Halide/releases/download/release_2016_10_25/halide-linux-32-gcc48-trunk-aa5d5514f179bf0ffe1a2dead0c0eb7300b4069a.tgz",
34-
"ab0545ebd8fff816676522fbfc434956ecd43b6fc1d46c4847ca9009223106e4",
33+
"https://github.com/halide/Halide/releases/download/release_2017_05_03/halide-linux-32-gcc48-trunk-06ace54101cbd656e22243f86cce0a82ba058c3b.tgz",
34+
"d29f6ef4a1e72110bbc8b30a188e424a190c54a2e3eb18574e8ef16fdb96693e",
3535
]
3636
}
3737

@@ -41,8 +41,8 @@ _HOST_DEFAULTS_K8 = {
4141
"linkopts": _LINKOPTS_DEFAULT,
4242
"http_archive_info": [
4343
# TODO: we default to gcc4.8 on Linux; is this the best choice?
44-
"https://github.com/halide/Halide/releases/download/release_2016_10_25/halide-linux-64-gcc48-trunk-aa5d5514f179bf0ffe1a2dead0c0eb7300b4069a.tgz",
45-
"f2c47f9ec4bcad0d8195e12653048ee49dbce0e828e0273242562813197a6c4b",
44+
"https://github.com/halide/Halide/releases/download/release_2017_05_03/halide-linux-64-gcc48-trunk-06ace54101cbd656e22243f86cce0a82ba058c3b.tgz",
45+
"c4038b651ddff5deb08de84e6aad165af1943b7cf4afc843c3117f2c7559db5b",
4646
]
4747
}
4848

@@ -51,8 +51,8 @@ _HOST_DEFAULTS_WIN64 = {
5151
"copts": _COPTS_DEFAULT,
5252
"linkopts": [],
5353
"http_archive_info": [
54-
"https://github.com/halide/Halide/releases/download/release_2016_10_25/halide-win-64-trunk-aa5d5514f179bf0ffe1a2dead0c0eb7300b4069a.zip",
55-
"17910e65edd9c7a3df74db73b11bc3bca021186f81beab82c245529839e45e98",
54+
"https://github.com/halide/Halide/releases/download/release_2017_05_03/halide-win-64-distro-trunk-06ace54101cbd656e22243f86cce0a82ba058c3b.zip",
55+
"acff86d010e40a06c32006452a383a0fcd70eaa57612360273b8da4f2b7f728e",
5656
]
5757
}
5858

halide_library.bzl.tpl

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,19 +252,30 @@ def halide_library(name,
252252

253253
# Batch up the .h and all the .o files into a cc_library (with the appropriate
254254
# select() in place to make things work well).
255+
_posix_opts = [
256+
"-ldl",
257+
"-lm",
258+
"-lpthread",
259+
"-lz",
260+
]
261+
_android_opts = [
262+
"-landroid",
263+
"-llog",
264+
]
265+
_msvc_opts = []
255266
native.cc_library(
256267
name=name,
257268
srcs=select(conditional_srcs) + [":%s" % header_output],
258269
deps=["@halide_distrib//:halide_runtime"] + filter_deps,
259270
# TODO: these linkopts will probably need to be conditionalized
260271
# for various platforms; they are correct for OSX and Linux.
261272
linkopts= select({
262-
"@halide_distrib//:config_x86_64_windows": [],
263-
"//conditions:default": [
264-
"-ldl",
265-
"-lm",
266-
"-lpthread",
267-
"-lz",
268-
]}),
273+
"@halide_distrib//:config_arm_32_android": _android_opts,
274+
"@halide_distrib//:config_arm_64_android": _android_opts,
275+
"@halide_distrib//:config_x86_32_android": _android_opts,
276+
"@halide_distrib//:config_x86_64_android": _android_opts,
277+
"@halide_distrib//:config_x86_64_windows": _msvc_opts,
278+
"//conditions:default": _posix_opts
279+
}),
269280
hdrs=["%s.h" % name],
270281
visibility=visibility)

0 commit comments

Comments
 (0)