-
Notifications
You must be signed in to change notification settings - Fork 12
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
Sidneym/add cmake #45
base: bcain/eld_support
Are you sure you want to change the base?
Conversation
@@ -318,12 +322,13 @@ which clang | |||
clang --version | |||
ninja --version | |||
cmake --version | |||
python3.8 --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC this change will cause failures, please test it w/the container build used by the release process - ARTIFACT_TAG=x.y.z ./build-in-container.sh
add_custom_target(eld | ||
DEPENDS clone | ||
COMMAND ${CMAKE_COMMAND} -E chdir llvm-project git clone git@github.qualcomm.com:cgit/eld.git | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repo is not public and cannot be used here.
@@ -0,0 +1,59 @@ | |||
cmake_minimum_required(VERSION 3.22) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I don't love having so many different ways to build the toolchain. If we're going to use cmake-to-run-shell-to-run-cmake it feels like we can cut out middle-man somehow.
If the environment variables are a PITA (I get it, they are), let's just fix the scripts to no longer depend on environment variables (instead take args?).
Supporting both the docker and the ad-hoc build mechanisms is challenging and the only reason it's survived so long is that there's very few people who actually do these builds.
If we have some consensus that this cmake is preferred, then please also include an update to the README so that we can abandon any support for running it outside of cmake and docker.
# Set variables with CACHE option to allow command line override | ||
set(HOST_CLANG_VER 21 CACHE STRING "Host Clang version") | ||
set(ARTIFACT_TAG 21.0.0 CACHE STRING "Artifact tag") | ||
set(INSTALL_ROOT /tmp/$ENV{USER}/hexagon-qemu CACHE STRING "Install root") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it's not appropriately labeled to accept a whole toolchain - do we want it to be called hexagon-qemu
? Also: tmpfs is probably not big enough to fit the biggest toolchains here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit msg suggests using: cmake -B ../build -DINSTALL_ROOT=$some_dir/install
This is just a place holder.
e662cf4
to
791b1fa
Compare
This keeps all the environment variables sane and allows for out-of-this-tree builds. Usage: cmake -B ../build -DINSTALL_ROOT=$some_dir/install cd to ../build and issue a, "make tools" command to build everything. Signed-off-by: Sid Manning <sidneym@quicinc.com>
791b1fa
to
082478c
Compare
I was driving a variation of this with a Makefile but since cmake is the new thing I changed it over and updated to match this baseline. |
No description provided.