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

Sidneym/add cmake #45

Open
wants to merge 1 commit into
base: bcain/eld_support
Choose a base branch
from
Open

Conversation

SidManning
Copy link
Contributor

No description provided.

@SidManning SidManning self-assigned this Feb 27, 2025
@SidManning SidManning changed the base branch from master to bcain/eld_support February 27, 2025 17:48
@@ -318,12 +322,13 @@ which clang
clang --version
ninja --version
cmake --version
python3.8 --version
Copy link
Contributor

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

Comment on lines +39 to +42
add_custom_target(eld
DEPENDS clone
COMMAND ${CMAKE_COMMAND} -E chdir llvm-project git clone git@github.qualcomm.com:cgit/eld.git
)
Copy link
Contributor

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)
Copy link
Contributor

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")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@SidManning SidManning force-pushed the sidneym/add-cmake branch 2 times, most recently from e662cf4 to 791b1fa Compare February 27, 2025 18:31
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>
@SidManning
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants