Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ jobs:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install clang-tidy
run: brew install llvm@21 lld@21

# We intentionally don't use VCPKG here so that we get some
# notification that the ecosystem is moving on without us.
- name: Install clang-tidy & dependencies
run: brew install flatbuffers llvm@21 lld@21 pybind11 wabt

- name: Run clang-tidy
run: ./run-clang-tidy.sh
env:
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/testing-arm-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,7 @@ jobs:
run: echo "Halide_LLVM_ROOT=$(halide-llvm --prefix)" >> "$GITHUB_ENV"

- name: Configure CMake
run: |
TOOLCHAIN_ARGS=()
if [[ "${{ matrix.bits }}" == "32" ]]; then
TOOLCHAIN_ARGS+=("-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/cmake/toolchain.linux-arm32.cmake")
fi

cmake -G Ninja -S . -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DHalide_LLVM_ROOT="${Halide_LLVM_ROOT}" \
-DWITH_PYTHON_BINDINGS=OFF \
"${TOOLCHAIN_ARGS[@]}"
run: cmake --preset ci-linux-arm-${{ matrix.bits }}

- name: Initial build
run: cmake --build build
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/testing-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,7 @@ jobs:
run: echo "Halide_LLVM_ROOT=$(halide-llvm --prefix)" >> "$GITHUB_ENV"

- name: Configure CMake
run: |
TOOLCHAIN_ARGS=()
if [[ "${{ matrix.bits }}" == "32" ]]; then
TOOLCHAIN_ARGS+=(
"-DCMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/cmake/toolchain.linux-i386.cmake"
"-DWITH_PYTHON_BINDINGS=OFF"
)
fi

cmake -G Ninja -S . -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DHalide_LLVM_ROOT="${Halide_LLVM_ROOT}" \
"${TOOLCHAIN_ARGS[@]}"
run: cmake --preset ci-linux-x86-${{ matrix.bits }}

- name: Initial build
run: cmake --build build
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/testing-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,7 @@ jobs:
run: echo "Halide_LLVM_ROOT=$(halide-llvm --prefix)" >> "$GITHUB_ENV"

- name: Configure CMake
run: |
# NB: vcpkg docs use VCPKG_ROOT, but GHA runners use VCPKG_INSTALLATION_ROOT
TOOLCHAIN_ARGS=(
"-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
"-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows"
"-DVCPKG_MANIFEST_FEATURES=developer"
)
if [[ "${{ matrix.bits }}" == "32" ]]; then
TOOLCHAIN_ARGS+=("-DWITH_PYTHON_BINDINGS=OFF")
fi

cmake -G Ninja -S . -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DHalide_LLVM_ROOT="${Halide_LLVM_ROOT}" \
"${TOOLCHAIN_ARGS[@]}"
run: cmake --preset ci-windows-x86-${{ matrix.bits }}

- name: Initial build
run: cmake --build build
Expand Down
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
cmake_minimum_required(VERSION 3.28)

# TODO: remove this after updating build bots.
if (CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
if (NOT DEFINED VCPKG_MANIFEST_FEATURES)
set(VCPKG_MANIFEST_FEATURES developer)
endif ()

# vcpkg and FetchContent are incompatible
set(Halide_USE_FETCHCONTENT OFF)
endif ()

option(Halide_USE_FETCHCONTENT "When Halide is top-level, use FetchContent for build-time dependencies." ON)
if (Halide_USE_FETCHCONTENT)
list(APPEND CMAKE_PROJECT_TOP_LEVEL_INCLUDES "${CMAKE_CURRENT_LIST_DIR}/cmake/dependencies.cmake")
endif ()

project(Halide
VERSION 22.0.0
DESCRIPTION "Halide compiler and libraries"
Expand Down
166 changes: 52 additions & 114 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,59 @@
{
"name": "ci",
"hidden": true,
"inherits": "base",
"toolchainFile": "${sourceDir}/cmake/toolchain.${presetName}.cmake",
"binaryDir": "build",
"installDir": "local",
"generator": "Ninja",
"toolchainFile": "$env{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"Halide_LLVM_SHARED_LIBS": false
"FETCHCONTENT_FULLY_DISCONNECTED": "ON",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchain.${presetName}.cmake",
"VCPKG_MANIFEST_FEATURES": "developer"
}
},
{
"name": "ci-linux-x86-64",
"inherits": "ci"
},
{
"name": "ci-linux-x86-32",
"inherits": "ci",
"cacheVariables": {
"WITH_PYTHON_BINDINGS": "NO"
}
},
{
"name": "ci-linux-arm-64",
"inherits": "ci",
"cacheVariables": {
"WITH_PYTHON_BINDINGS": "NO"
}
},
{
"name": "ci-linux-arm-32",
"inherits": "ci",
"cacheVariables": {
"WITH_PYTHON_BINDINGS": "NO"
}
},
{
"name": "ci-macos-arm-64",
"inherits": "ci"
},
{
"name": "ci-macos-x86-64",
"inherits": "ci"
},
{
"name": "ci-windows-x86-64",
"inherits": "ci"
},
{
"name": "ci-windows-x86-32",
"inherits": "ci",
"cacheVariables": {
"WITH_PYTHON_BINDINGS": "NO"
}
},
{
Expand All @@ -30,7 +78,7 @@
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"VCPKG_MANIFEST_FEATURES": "developer",
"Halide_USE_FETCHCONTENT": false
"FETCHCONTENT_FULLY_DISCONNECTED": "ON"
}
},
{
Expand Down Expand Up @@ -121,49 +169,6 @@
"displayName": "macOS (vcpkg)",
"description": "macOS build with vcpkg dependencies"
},
{
"name": "package",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"LLVM_DIR": "$env{LLVM_DIR}",
"Clang_DIR": "$env{Clang_DIR}",
"LLD_DIR": "$env{LLD_DIR}",
"WITH_TESTS": "NO",
"WITH_TUTORIALS": "NO",
"WITH_DOCS": "YES",
"WITH_UTILS": "YES",
"WITH_PYTHON_BINDINGS": "NO",
"CMAKE_INSTALL_DATADIR": "share/Halide"
}
},
{
"name": "package-windows",
"inherits": [
"package",
"vs2022"
],
"displayName": "Package ZIP for Windows",
"description": "Build for packaging Windows shared libraries.",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"BUILD_SHARED_LIBS": "YES",
"CMAKE_INSTALL_BINDIR": "bin/$<CONFIG>",
"CMAKE_INSTALL_LIBDIR": "lib/$<CONFIG>",
"Halide_INSTALL_CMAKEDIR": "lib/cmake/Halide",
"Halide_INSTALL_HELPERSDIR": "lib/cmake/HalideHelpers"
}
},
{
"name": "package-unix",
"inherits": "package",
"displayName": "Package UNIX shared libs",
"description": "Build for packaging UNIX shared libraries.",
"binaryDir": "shared-Release",
"cacheVariables": {
"BUILD_SHARED_LIBS": "YES"
}
},
{
"name": "linux-x64-asan",
"inherits": "ci",
Expand Down Expand Up @@ -195,72 +200,5 @@
"BUILD_SHARED_LIBS": "NO"
}
}
],
"buildPresets": [
{
"name": "debug",
"configurePreset": "debug",
"displayName": "Debug",
"description": "Debug build with no special settings"
},
{
"name": "release",
"configurePreset": "release",
"displayName": "Release",
"description": "Release build with no special settings"
},
{
"name": "linux-x64-asan",
"configurePreset": "linux-x64-asan",
"displayName": "ASAN (Linux x64)",
"description": "Build everything with ASAN enabled"
},
{
"name": "linux-x64-fuzzer",
"configurePreset": "linux-x64-fuzzer",
"displayName": "Fuzzing (Linux x64)",
"description": "Build everything with fuzzing enabled"
}
],
"testPresets": [
{
"name": "debug",
"configurePreset": "debug",
"displayName": "Debug",
"description": "Test everything with Debug build",
"output": {
"outputOnFailure": true
}
},
{
"name": "release",
"configurePreset": "release",
"displayName": "Release",
"description": "Test everything with Release build",
"output": {
"outputOnFailure": true
}
},
{
"name": "linux-x64-asan",
"configurePreset": "linux-x64-asan",
"displayName": "ASAN (Linux x64)",
"description": "Test everything with ASAN enabled",
"environment": {
"ASAN_OPTIONS": "detect_leaks=0:detect_container_overflow=0"
},
"output": {
"outputOnFailure": true
}
},
{
"name": "linux-x64-fuzzer",
"configurePreset": "linux-x64-fuzzer",
"displayName": "Fuzzing (Linux x64)",
"description": "Test everything with fuzzing enabled",
"output": {
"outputOnFailure": true
}
}
]
}
5 changes: 4 additions & 1 deletion apps/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"eigen3",
"libjpeg-turbo",
"libpng",
"openblas",
{
"name": "openblas",
"platform": "(windows & x64 & !uwp & !xbox) | (linux & x64) | (linux & arm64)"
},
{
"name": "opencl",
"platform": "(windows & x64 & !uwp & !xbox) | (linux & x64) | (linux & arm64)"
Expand Down
77 changes: 0 additions & 77 deletions cmake/dependencies.cmake

This file was deleted.

11 changes: 11 additions & 0 deletions cmake/toolchain.ci-linux-arm-32.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)

set(CMAKE_C_FLAGS_INIT "-mfp16-format=ieee -Wno-psabi")
set(CMAKE_CXX_FLAGS_INIT "-mfp16-format=ieee -Wno-psabi")

set(VCPKG_TARGET_TRIPLET arm-linux)
set(CMAKE_CROSSCOMPILING FALSE)
1 change: 1 addition & 0 deletions cmake/toolchain.ci-linux-arm-64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Native AArch64 Linux build. No toolchain configuration needed.
Loading
Loading