Skip to content

CMake changes to land ahead of releases#5253

Merged
steven-johnson merged 10 commits intomasterfrom
packaging/releases
Sep 9, 2020
Merged

CMake changes to land ahead of releases#5253
steven-johnson merged 10 commits intomasterfrom
packaging/releases

Conversation

@alexreinking
Copy link
Member

@alexreinking alexreinking commented Sep 8, 2020

I would still love to get #5228 merged before the CppCon talk so that people can use the autoschedulers, but these changes at least will let us update the buildbots now.

This PR consolidates all the CMake packaging logic into packaging/CMakeLists.txt. It had been spread around a bit, but this was getting harder to justify.

It also makes the packaging scripts which invoke the build multiple times suitable for buildbot use.

Fixes #4738

Also includes a handful of style normalizations that will be distracting while reviewing that PR...
@alexreinking alexreinking added the build Issues related to building Halide and with CI label Sep 8, 2020
Copy link
Contributor

@steven-johnson steven-johnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit

@steven-johnson
Copy link
Contributor

I would still love to get #5228 merged before the CppCon talk

What's remaining to be done? (Last I looked it was still marked 'draft')

@alexreinking
Copy link
Member Author

What's remaining to be done? (Last I looked it was still marked 'draft')

I've got it working for CMake, but haven't touched the Makefiles.

@@ -5,13 +5,15 @@ DIR="$(cd "$(dirname "${(%):-%N}")"/.. >/dev/null 2>&1 && pwd)"
[ -z "$LLVM_DIR" ] && echo "Must set specific LLVM_DIR for packaging" && exit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...It's really weird to have both package-unix.zsh and package-unix.sh.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(to be more specific: it would be vastly preferable to have a single .sh that will work under both zsh and bash.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on my mac for both bash and zsh:

DIR=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)/")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #!/bin/bash up top renders that moot. But I guess Apple hasn't deleted bash from their OS yet. We can just drop the zsh script.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, we should probably nuke Unix.cmake too and just toll it into the unix shell script. (Sorry for all the change requests after approval...)

@steven-johnson
Copy link
Contributor

Suggestion: also change project(Halide VERSION 10.0.0) -> 12.0.0, since our default trunk should track default LLVM trunk

@alexreinking
Copy link
Member Author

Suggestion: also change project(Halide VERSION 10.0.0) -> 12.0.0, since our default trunk should track default LLVM trunk

Done

Copy link
Contributor

@steven-johnson steven-johnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another suggestion for the packaging scripts: it's probably preferable to have the buildbots use these scripts directly (rather than replicate the logic) so that there's a single point of truth; however, these need to be a bit more configurable for that to work well. In particular, being able to explicitly specify the source and build dirs (rather than inferring them relative to the script) is really gonna be necessary.

@@ -5,13 +5,15 @@ DIR="$(cd "$(dirname "${(%):-%N}")"/.. >/dev/null 2>&1 && pwd)"
[ -z "$LLVM_DIR" ] && echo "Must set specific LLVM_DIR for packaging" && exit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on my mac for both bash and zsh:

DIR=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)/")

@alexreinking
Copy link
Member Author

alexreinking commented Sep 8, 2020

Yet another suggestion for the packaging scripts: it's probably preferable to have the buildbots use these scripts directly (rather than replicate the logic) so that there's a single point of truth; however, these need to be a bit more configurable for that to work well. In particular, being able to explicitly specify the source and build dirs (rather than inferring them relative to the script) is really gonna be necessary.

If I could snap my fingers and make it happen, the buildbots would read all of their config out of the repository.

The Unix.cmake file needs to know the directory names, too. Maybe we can make the scripts write out the correct file?

@steven-johnson
Copy link
Contributor

The failure for x86-64-linux-testbranch-trunk-cmake is unrelated and should not block landing

@alexreinking
Copy link
Member Author

Sounds good. Is there anything else you need in the package scripts?

@steven-johnson
Copy link
Contributor

Sounds good. Is there anything else you need in the package scripts?

The scripts look good for now. Ready to land once the buildbots get to 18 run.

@steven-johnson
Copy link
Contributor

ok, I think this has enough test coverage to land.

@steven-johnson steven-johnson merged commit cb62083 into master Sep 9, 2020
@steven-johnson steven-johnson deleted the packaging/releases branch September 9, 2020 19:11
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.

Makefile is not setting SONAME for libHalide.so

2 participants