Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake "Day 1" patch #4980

Merged
merged 36 commits into from
Jun 1, 2020
Merged

CMake "Day 1" patch #4980

merged 36 commits into from
Jun 1, 2020

Conversation

alexreinking
Copy link
Member

@alexreinking alexreinking commented May 29, 2020

Fixes several issues found on initial deployment of new CMake build, and adds a few new features:

  • Clang_DIR-inferred-from-LLVM_DIR is now preferred when only LLVM_DIR is defined
  • Binary size issues resolved
  • Apps now print "Success!" messages to ensure they ran correctly and didn't just print 0-status usage messages (affected camera_pipeline)
    • Linear algebra tests now know their underlying CBlas implementation (missing command-line define)
  • Option added for enabling WASM backend (no WASM tests, yet, though)
  • Add multi-config packaging logic to Win32.
  • Fixing Python apps that crash with host-cuda.

Regarding packaging, the intended workflow is to use a multi-config generator like Visual Studio or Ninja Multi-Config (currently broken on Windows, see this discussion on CMake Discourse).

Then you just:

> cmake --build . --config Debug
> cmake --build . --config Release
> cpack -C "Debug;Release"

@alexreinking alexreinking changed the title "Day 1" CMake patch CMake "Day 1" patch May 29, 2020
@alexreinking alexreinking added the build Issues related to building Halide and with CI label May 29, 2020
@alexreinking
Copy link
Member Author

Ninja Multi-Config bug was confirmed by maintainers. See https://gitlab.kitware.com/cmake/cmake/-/issues/20775

@alexreinking
Copy link
Member Author

alexreinking commented May 29, 2020

Looks like _alloca doesn't exist when you disable exceptions on MSVC. Odd. Including the <malloc.h> header seems to fix this. I pushed that fix and stopped the buildbots on the previous push.

@alexreinking
Copy link
Member Author

alexreinking commented Jun 1, 2020

Python build requires exceptions to be enabled in Halide. Otherwise the correctness test "test_compiletime_error" calls abort() which can't be caught by Python. Similarly with tuple_data and pystub.

@steven-johnson -- we should add HALIDE_ENABLE_EXCEPTIONS=YES to our buildbot flags. Alternatively, we can make it the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building Halide and with CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants