Skip to content

Commit 838ded7

Browse files
committed
Remove feature Halide_BUNDLE_STATIC
1 parent cd3071e commit 838ded7

9 files changed

Lines changed: 16 additions & 194 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ include(CheckCXXSymbolExists)
4242

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

226-
Halide_feature(Halide_BUNDLE_STATIC "Bundle Halide's static dependencies" OFF ADVANCED
227-
DEPENDS NOT BUILD_SHARED_LIBS)
228-
229225
Halide_feature(Halide_ENABLE_EXCEPTIONS "Enable exceptions in Halide" ON)
230226
Halide_feature(Halide_ENABLE_RTTI "Enable RTTI in Halide" ON
231227
DEPENDS LLVM_ENABLE_RTTI)
232-
Halide_feature(Halide_BUNDLE_STATIC "Bundle Halide's static dependencies" OFF ADVANCED
233-
DEPENDS NOT BUILD_SHARED_LIBS)
234228

235229
Halide_feature(WITH_AUTOSCHEDULERS "Build the Halide autoschedulers" ON
236230
DEPENDS BUILD_SHARED_LIBS)

CMakePresets.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
}
213213
},
214214
{
215-
"name": "package-unix-shared",
215+
"name": "package-unix",
216216
"inherits": "package",
217217
"displayName": "Package UNIX shared libs",
218218
"description": "Build for packaging UNIX shared libraries.",
@@ -221,17 +221,6 @@
221221
"BUILD_SHARED_LIBS": "YES"
222222
}
223223
},
224-
{
225-
"name": "package-unix-static",
226-
"inherits": "package",
227-
"displayName": "Package UNIX static libs",
228-
"description": "Build for packaging UNIX static libraries.",
229-
"binaryDir": "static-Release",
230-
"cacheVariables": {
231-
"BUILD_SHARED_LIBS": "NO",
232-
"Halide_BUNDLE_STATIC": "YES"
233-
}
234-
},
235224
{
236225
"name": "linux-x64-asan",
237226
"inherits": "ci",

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Halide is a programming language designed to make it easier to write
44
high-performance image and array processing code on modern machines. Halide
55
currently targets:
66

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

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

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

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

387-
When building the tests, you can set the AOT compilation target with the
387+
When building the tests, you can set the AOT compilation target with the
388388
`HL_TARGET` environment variable.
389389

390390
### Building Halide out-of-tree with make

cmake/BundleStatic.cmake

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

doc/BuildingHalideWithCMake.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ compiled.
420420
| Option | Default | Description |
421421
|------------------------------------------|-----------------------|---------------------------------------------------------------------------------------------------|
422422
| [`BUILD_SHARED_LIBS`][build_shared_libs] | `ON` | Standard CMake variable that chooses whether to build as a static or shared library. |
423-
| `Halide_BUNDLE_STATIC` | `OFF` | When building Halide as a static library, merge static library dependencies into libHalide.a. |
424423
| `Halide_LLVM_SHARED_LIBS` | `OFF` | Link to the shared version of LLVM. Not available on Windows. |
425424
| `Halide_ENABLE_RTTI` | _inherited from LLVM_ | Enable RTTI when building Halide. Recommended to be set to `ON` |
426425
| `Halide_ENABLE_EXCEPTIONS` | `ON` | Enable exceptions when building Halide |

packaging/common/Description.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Halide is a programming language designed to make it easier to write
2-
high-performance image and array processing code on modern machines. Halide
3-
currently targets:
1+
Halide is a programming language designed to make it easier to write
2+
high-performance image and array processing code on modern machines. Halide
3+
currently targets:
44

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

99
Rather than being a standalone programming language, Halide is embedded in C++.
1010
This means you write C++ code that builds an in-memory representation of a

packaging/tgz/config.cmake

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

packaging/tgz/package.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@ halide_build_root=$(realpath "$2")
99
[ -z "$halide_source" ] && echo "Usage: $0 <source-dir> <build-dir>" && exit
1010
[ -z "$halide_build_root" ] && echo "Usage: $0 <source-dir> <build-dir>" && exit
1111

12-
cmake --preset=package-unix-shared -S "$halide_source" -B "$halide_build_root/shared-Release" \
13-
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
14-
cmake --preset=package-unix-static -S "$halide_source" -B "$halide_build_root/static-Release" \
12+
cmake --preset=package-unix -S "$halide_source" -B "$halide_build_root/shared-Release" \
1513
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
1614

1715
cmake --build "$halide_build_root/shared-Release"
18-
cmake --build "$halide_build_root/static-Release"
1916

2017
cd "$halide_build_root"
2118

22-
cpack -G TGZ -C Release --config "$halide_source/packaging/tgz/config.cmake"
19+
cpack -G TGZ -C Release

src/CMakeLists.txt

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,6 @@ target_sources(
487487
FILES "${Halide_BINARY_DIR}/include/Halide.h"
488488
)
489489

490-
if (Halide_BUNDLE_STATIC)
491-
bundle_static(Halide)
492-
endif ()
493-
494490
##
495491
# CodeGen backends
496492
##
@@ -499,11 +495,7 @@ endif ()
499495
foreach (backend IN LISTS Halide_LLVM_COMPONENTS)
500496
string(TOUPPER "WITH_${backend}" definition)
501497
target_compile_definitions(Halide PRIVATE "${definition}")
502-
if (Halide_BUNDLE_STATIC AND NOT Halide_LLVM_SHARED_LIBS)
503-
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:Halide_LLVM::${backend}>")
504-
else ()
505-
target_link_libraries(Halide PRIVATE Halide_LLVM::${backend})
506-
endif ()
498+
target_link_libraries(Halide PRIVATE Halide_LLVM::${backend})
507499
endforeach ()
508500

509501
# GPU backends
@@ -538,9 +530,7 @@ if (WITH_SERIALIZATION)
538530
)
539531
_Halide_pkgdep(flatbuffers)
540532

541-
if (Halide_BUNDLE_STATIC)
542-
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:flatbuffers::flatbuffers>")
543-
elseif (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
533+
if (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
544534
target_sources(Halide PRIVATE "$<TARGET_OBJECTS:flatbuffers::flatbuffers>")
545535
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:$<COMPILE_ONLY:flatbuffers::flatbuffers>>")
546536
else ()
@@ -600,9 +590,7 @@ if (Halide_WASM_BACKEND STREQUAL "wabt")
600590
find_package(wabt 1.0.36 REQUIRED)
601591
_Halide_pkgdep(wabt)
602592

603-
if (Halide_BUNDLE_STATIC)
604-
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:wabt::wabt>")
605-
elseif (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
593+
if (Halide_USE_FETCHCONTENT AND NOT BUILD_SHARED_LIBS)
606594
target_sources(Halide PRIVATE "$<TARGET_OBJECTS:wabt::wabt>")
607595
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:$<COMPILE_ONLY:wabt::wabt>>")
608596
else ()
@@ -614,13 +602,7 @@ elseif (Halide_WASM_BACKEND STREQUAL "V8")
614602
find_package(V8 REQUIRED)
615603
_Halide_pkgdep(V8)
616604
target_compile_definitions(Halide PRIVATE WITH_V8)
617-
618-
get_property(type TARGET V8::V8 PROPERTY TYPE)
619-
if (Halide_BUNDLE_STATIC AND type STREQUAL "STATIC_LIBRARY")
620-
target_link_libraries(Halide PRIVATE "$<BUILD_LOCAL_INTERFACE:V8::V8>")
621-
else ()
622-
target_link_libraries(Halide PRIVATE V8::V8)
623-
endif ()
605+
target_link_libraries(Halide PRIVATE V8::V8)
624606
elseif (Halide_WASM_BACKEND)
625607
message(FATAL_ERROR "Unknown Halide_WASM_BACKEND `${Halide_WASM_BACKEND}`")
626608
endif ()

0 commit comments

Comments
 (0)