forked from bazelbuild/bazel-central-registry
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Test Test Plan: Smart Commit:
- Loading branch information
Showing
6 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Module halide_windows to modularize the dependencies from halide windows version.""" | ||
|
||
module( | ||
name = "halide_windows_arm64", | ||
version = "18.0.0", | ||
compatibility_level = 1, | ||
) | ||
|
||
bazel_dep(name = "rules_cc", version = "0.0.9") | ||
bazel_dep(name = "platforms", version = "0.0.8") |
113 changes: 113 additions & 0 deletions
113
modules/halide_windows_arm64/18.0.0/patches/add_build_file.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
From 462d39ee301790d9b8487d7226ca43d1888b2820 Mon Sep 17 00:00:00 2001 | ||
From: Cesare Mercurio <[email protected]> | ||
Date: Thu, 4 Apr 2024 16:13:25 -0700 | ||
Subject: [PATCH] JRA-Halide : Add BUILD file | ||
|
||
Summary: | ||
Adds BUILD bazel file | ||
|
||
Test Plan: | ||
|
||
Smart Commit: | ||
--- | ||
BUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
halide.bzl | 25 +++++++++++++++++++++++++ | ||
2 files changed, 79 insertions(+) | ||
create mode 100644 BUILD | ||
create mode 100644 halide.bzl | ||
|
||
diff --git a/BUILD b/BUILD | ||
new file mode 100644 | ||
index 000000000..2f0835479 | ||
--- /dev/null | ||
+++ b/BUILD | ||
@@ -0,0 +1,54 @@ | ||
+load(":halide.bzl", "halide_language_copts") | ||
+ | ||
+licenses(["notice"]) | ||
+ | ||
+package(default_visibility = ["//visibility:public"]) | ||
+ | ||
+cc_library( | ||
+ name = "language", | ||
+ hdrs = ["include/Halide.h"], | ||
+ copts = halide_language_copts(), | ||
+ includes = ["include"], | ||
+ deps = [ | ||
+ ":runtime", | ||
+ ], | ||
+) | ||
+ | ||
+cc_library( | ||
+ name = "runtime", | ||
+ hdrs = glob([ | ||
+ "include/HalideRuntime*.h", | ||
+ "include/HalideBuffer*.h", | ||
+ ]), | ||
+ includes = ["include"], | ||
+) | ||
+ | ||
+cc_library( | ||
+ name = "lib_halide_static", | ||
+ srcs = select({ | ||
+ "@platforms//os:windows": [ | ||
+ "bin/Release/Halide.dll", | ||
+ "lib/Release/Halide.lib", | ||
+ ], | ||
+ "//conditions:default": [ | ||
+ "lib/libHalide.a", | ||
+ ], | ||
+ }), | ||
+ visibility = ["//visibility:public"], | ||
+) | ||
+ | ||
+cc_library( | ||
+ name = "gengen", | ||
+ srcs = [ | ||
+ "share/Halide/tools/GenGen.cpp", | ||
+ ], | ||
+ includes = [ | ||
+ "include", | ||
+ "share/Halide/tools", | ||
+ ], | ||
+ visibility = ["//visibility:public"], | ||
+ deps = [ | ||
+ ":language", | ||
+ ":lib_halide_static", | ||
+ ], | ||
+) | ||
\ No newline at end of file | ||
diff --git a/halide.bzl b/halide.bzl | ||
new file mode 100644 | ||
index 000000000..3d8164be7 | ||
--- /dev/null | ||
+++ b/halide.bzl | ||
@@ -0,0 +1,25 @@ | ||
+"""Bazel build rules for Halide.""" | ||
+load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "use_cpp_toolchain") | ||
+ | ||
+def halide_language_copts(): | ||
+ _common_opts = [ | ||
+ "-fPIC", | ||
+ "-frtti", | ||
+ "-std=c++20", | ||
+ "-Wno-conversion", | ||
+ "-Wno-sign-compare", | ||
+ ] | ||
+ _posix_opts = [ | ||
+ "$(STACK_FRAME_UNLIMITED)", | ||
+ "-fno-exceptions", | ||
+ "-funwind-tables", | ||
+ "-fvisibility-inlines-hidden", | ||
+ ] | ||
+ _msvc_opts = [ | ||
+ "-D_CRT_SECURE_NO_WARNINGS", | ||
+ "/MD", | ||
+ ] | ||
+ return _common_opts + select({ | ||
+ "//conditions:default": _posix_opts, | ||
+ "@platforms//os:windows": _msvc_opts, | ||
+ }) | ||
-- | ||
2.43.2 | ||
|
30 changes: 30 additions & 0 deletions
30
modules/halide_windows_arm64/18.0.0/patches/add_module_dot_bazel.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 8f7b93b6c7098e7a4fef34cdec1575b61ab9d8d3 Mon Sep 17 00:00:00 2001 | ||
From: Cesare Mercurio <[email protected]> | ||
Date: Fri, 15 Dec 2023 23:39:13 -0800 | ||
Subject: [PATCH 1/2] VVI-Halide-patch : add bzlmod module | ||
|
||
Summary: | ||
Adds module for blzmod registry | ||
|
||
Test Plan: | ||
integration with vvplatform | ||
--- | ||
MODULE.bazel | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
create mode 100644 MODULE.bazel | ||
|
||
diff --git a/MODULE.bazel b/MODULE.bazel | ||
new file mode 100644 | ||
index 000000000..9227b1e2c | ||
--- /dev/null | ||
+++ b/MODULE.bazel | ||
@@ -0,0 +1,3 @@ | ||
+module(name = "halide_windows_arm64", version = "18.0.0") | ||
+ | ||
+bazel_dep(name = "bazel_skylib", version = "1.4.2") | ||
+bazel_dep(name = "platforms", version = "0.0.8") | ||
+bazel_dep(name = "rules_cc", version = "0.0.9") | ||
\ No newline at end of file | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
platforms: | ||
windows: | ||
build_targets: | ||
- '@halide_windows_arm64//:halide_windows_arm64' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"integrity": "sha256-lVaj/BboOeFBvZXZBq9XbPOvDZbNFlwHXoE0FaMabWM=", | ||
"patch_strip": 1, | ||
"patches": { | ||
"add_build_file.patch": "sha256-7i8SSa86VduW9+NvZOSjfPfuF3cLxeyu++tEsZNr3ZQ=", | ||
"add_module_dot_bazel.patch": "sha256-Dr/730Benf6bUoh/S5q2PxfOA18xBq0ZYqxot4pgFDM=" | ||
}, | ||
"strip_prefix": "Halide-windows-arm64", | ||
"url": "https://github.com/xFile3160/halide-windows-arm64/releases/download/v18.0.0/Halide-windows-arm64.zip" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"homepage": "https://github.com/xFile3160/halide-windows-arm64", | ||
"maintainers": [], | ||
"repository": [ | ||
"github:xFile3160/halide-windows-arm64" | ||
], | ||
"versions": [ | ||
"18.0.0" | ||
], | ||
"yanked_versions": {} | ||
} |