Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ include(CheckCXXSymbolExists)

# Make our custom helpers available throughout the project via include().
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
include(BundleStatic)
include(HalideFeatures)
include(HalideGeneratorHelpers)
include(HalidePackageConfigHelpers)
Expand Down Expand Up @@ -223,14 +222,9 @@ find_package(PNG)
##
# Optional features. These settings are defined early so that subdirectories see a consistent view

Halide_feature(Halide_BUNDLE_STATIC "Bundle Halide's static dependencies" OFF ADVANCED
DEPENDS NOT BUILD_SHARED_LIBS)

Halide_feature(Halide_ENABLE_EXCEPTIONS "Enable exceptions in Halide" ON)
Halide_feature(Halide_ENABLE_RTTI "Enable RTTI in Halide" ON
DEPENDS LLVM_ENABLE_RTTI)
Halide_feature(Halide_BUNDLE_STATIC "Bundle Halide's static dependencies" OFF ADVANCED
DEPENDS NOT BUILD_SHARED_LIBS)

Halide_feature(WITH_AUTOSCHEDULERS "Build the Halide autoschedulers" ON
DEPENDS BUILD_SHARED_LIBS)
Expand Down
13 changes: 1 addition & 12 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
}
},
{
"name": "package-unix-shared",
"name": "package-unix",
"inherits": "package",
"displayName": "Package UNIX shared libs",
"description": "Build for packaging UNIX shared libraries.",
Expand All @@ -221,17 +221,6 @@
"BUILD_SHARED_LIBS": "YES"
}
},
{
"name": "package-unix-static",
"inherits": "package",
"displayName": "Package UNIX static libs",
"description": "Build for packaging UNIX static libraries.",
"binaryDir": "static-Release",
"cacheVariables": {
"BUILD_SHARED_LIBS": "NO",
"Halide_BUNDLE_STATIC": "YES"
}
},
{
"name": "linux-x64-asan",
"inherits": "ci",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Halide is a programming language designed to make it easier to write
high-performance image and array processing code on modern machines. Halide
currently targets:

- CPU architectures: X86, ARM, Hexagon, PowerPC, RISC-V
- CPU architectures: X86, ARM, Hexagon, PowerPC, RISC-V, WebAssembly
- Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT
- GPU Compute APIs: CUDA, OpenCL, Apple Metal, Microsoft Direct X 12, Vulkan

Expand Down Expand Up @@ -86,7 +86,7 @@ need to adjust compiler options accordingly if you're using an older XCode which
does not default to libc++.

We use a recent Ubuntu LTS to build the Linux releases; if your distribution is
too old, it might not have the requisite glibc.
too old, it might not have the requisite glibc.

Nightly builds of Halide and the LLVM versions we use in CI are also available
at https://buildbot.halide-lang.org/
Expand Down Expand Up @@ -384,7 +384,7 @@ Now you should be able to just run `make` in the root directory of the Halide
source tree. `make run_tests` will run the JIT test suite, and `make test_apps`
will make sure all the apps compile and run (but won't check their output).

When building the tests, you can set the AOT compilation target with the
When building the tests, you can set the AOT compilation target with the
`HL_TARGET` environment variable.

### Building Halide out-of-tree with make
Expand Down
124 changes: 0 additions & 124 deletions cmake/BundleStatic.cmake

This file was deleted.

1 change: 0 additions & 1 deletion doc/BuildingHalideWithCMake.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ compiled.
| Option | Default | Description |
|------------------------------------------|-----------------------|---------------------------------------------------------------------------------------------------|
| [`BUILD_SHARED_LIBS`][build_shared_libs] | `ON` | Standard CMake variable that chooses whether to build as a static or shared library. |
| `Halide_BUNDLE_STATIC` | `OFF` | When building Halide as a static library, merge static library dependencies into libHalide.a. |
| `Halide_LLVM_SHARED_LIBS` | `OFF` | Link to the shared version of LLVM. Not available on Windows. |
| `Halide_ENABLE_RTTI` | _inherited from LLVM_ | Enable RTTI when building Halide. Recommended to be set to `ON` |
| `Halide_ENABLE_EXCEPTIONS` | `ON` | Enable exceptions when building Halide |
Expand Down
12 changes: 6 additions & 6 deletions packaging/common/Description.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Halide is a programming language designed to make it easier to write
high-performance image and array processing code on modern machines. Halide
currently targets:
Halide is a programming language designed to make it easier to write
high-performance image and array processing code on modern machines. Halide
currently targets:

* CPU architectures: X86, ARM, Hexagon, PowerPC, RISC-V, WebAssembly
* Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT
* GPU APIs: CUDA, OpenCL, Apple Metal, Direct X 12
- CPU architectures: X86, ARM, Hexagon, PowerPC, RISC-V, WebAssembly
- Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT
- GPU Compute APIs: CUDA, OpenCL, Apple Metal, Microsoft Direct X 12, Vulkan

Rather than being a standalone programming language, Halide is embedded in C++.
This means you write C++ code that builds an in-memory representation of a
Expand Down
15 changes: 0 additions & 15 deletions packaging/tgz/config.cmake

This file was deleted.

7 changes: 2 additions & 5 deletions packaging/tgz/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ halide_build_root=$(realpath "$2")
[ -z "$halide_source" ] && echo "Usage: $0 <source-dir> <build-dir>" && exit
[ -z "$halide_build_root" ] && echo "Usage: $0 <source-dir> <build-dir>" && exit

cmake --preset=package-unix-shared -S "$halide_source" -B "$halide_build_root/shared-Release" \
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
cmake --preset=package-unix-static -S "$halide_source" -B "$halide_build_root/static-Release" \
cmake --preset=package-unix -S "$halide_source" -B "$halide_build_root/shared-Release" \
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"

cmake --build "$halide_build_root/shared-Release"
cmake --build "$halide_build_root/static-Release"

cd "$halide_build_root"

cpack -G TGZ -C Release --config "$halide_source/packaging/tgz/config.cmake"
cpack -G TGZ -C Release
26 changes: 4 additions & 22 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,6 @@ target_sources(
FILES "${Halide_BINARY_DIR}/include/Halide.h"
)

if (Halide_BUNDLE_STATIC)
bundle_static(Halide)
endif ()

##
# CodeGen backends
##
Expand All @@ -499,11 +495,7 @@ endif ()
foreach (backend IN LISTS Halide_LLVM_COMPONENTS)
string(TOUPPER "WITH_${backend}" definition)
target_compile_definitions(Halide PRIVATE "${definition}")
if (Halide_BUNDLE_STATIC AND NOT Halide_LLVM_SHARED_LIBS)
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:Halide_LLVM::${backend}>")
else ()
target_link_libraries(Halide PRIVATE Halide_LLVM::${backend})
endif ()
target_link_libraries(Halide PRIVATE Halide_LLVM::${backend})
endforeach ()

# GPU backends
Expand Down Expand Up @@ -538,9 +530,7 @@ if (WITH_SERIALIZATION)
)
_Halide_pkgdep(flatbuffers)

if (Halide_BUNDLE_STATIC)
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:flatbuffers::flatbuffers>")
elseif (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
if (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
target_sources(Halide PRIVATE "$<TARGET_OBJECTS:flatbuffers::flatbuffers>")
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:$<COMPILE_ONLY:flatbuffers::flatbuffers>>")
else ()
Expand Down Expand Up @@ -600,9 +590,7 @@ if (Halide_WASM_BACKEND STREQUAL "wabt")
find_package(wabt 1.0.36 REQUIRED)
_Halide_pkgdep(wabt)

if (Halide_BUNDLE_STATIC)
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:wabt::wabt>")
elseif (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
if (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
target_sources(Halide PRIVATE "$<TARGET_OBJECTS:wabt::wabt>")
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:$<COMPILE_ONLY:wabt::wabt>>")
else ()
Expand All @@ -614,13 +602,7 @@ elseif (Halide_WASM_BACKEND STREQUAL "V8")
find_package(V8 REQUIRED)
_Halide_pkgdep(V8)
target_compile_definitions(Halide PRIVATE WITH_V8)

get_property(type TARGET V8::V8 PROPERTY TYPE)
if (Halide_BUNDLE_STATIC AND type STREQUAL "STATIC_LIBRARY")
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:V8::V8>")
else ()
target_link_libraries(Halide PRIVATE V8::V8)
endif ()
target_link_libraries(Halide PRIVATE V8::V8)
elseif (Halide_WASM_BACKEND)
message(FATAL_ERROR "Unknown Halide_WASM_BACKEND `${Halide_WASM_BACKEND}`")
endif ()
Expand Down
Loading