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

Switch to upstream cache files, Add test cases, etc #41

Merged
merged 7 commits into from
Jan 23, 2025

Conversation

androm3da
Copy link
Contributor

No description provided.

Since this cache value overrides the defaults, we end up with `clang` linked
to `clang-20`, and some `${triple}-clang*` links, but we're missing `clang++`.
This makes for a toolchain with inconsistent behavior when used in someone's
`$PATH`.

We'll add the default symlinks to our list so that C and C++ programs
are both built as expected when `clang` and `clang++` are invoked.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
@androm3da androm3da self-assigned this Jan 22, 2025
@androm3da androm3da force-pushed the bcain/cachefiles_n_testing branch from 36987f6 to b6750a3 Compare January 23, 2025 04:31
androm3da and others added 6 commits January 23, 2025 06:34
To better integrate our components builds into the upstream project,
we've contributed the cmake cache files there.  This will give better
community visibility into the hexagon toolchain's use cases.

The cmake cache files were created after release/19.x, in these llvm-project
commits:
* c906907d871d ([hexagon][cmake] Disable ctx_profile (#117965), 2024-12-02)
* ea62db0c0398 ([cmake] Add hexagon-linux cmake cache files (#98712), 2024-10-03)

Let's switch to build using the now-upstream llvm-project cmake cache files
instead.

Signed-off-by: Brian Cain <bcain@quicinc.com>
Since 0819ad0 ([cmake] Switch to llvm-project cache files, 2024-09-06),
these files are no longer used, we use the corresponding ones from
the llvm-project repo instead.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
In llvm/llvm-project@6c4267f,
there's a `target_compile_features()` directive that appears to cause the
runtimes build to check the toolchain for C++17 support.  This appears
to depend on the C++ library being present, which is not possible because
we haven't built it yet.

Either this is a bug in the runtimes' build mechanism or it's the intended
behavior and we need to special-case our bootstrap build.  Regardless,
this change makes sense for the time being.

See also:
* llvm/llvm-project#114591
* llvm/llvm-project#123184
* https://discourse.llvm.org/t/bootstrapping-cross-compiler-runtimes-build-failure/84194

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
These tests appear to be passing and increase our overall coverage, so
let's add them to the test suite.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Having this enabled makes the logs easier to read.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
It seemed like a nice idea to specify the scope via cmake and then
just use the generic `install` target but problems like f546294 (Disable
ctx_profile to fix clangrt-builtins, 2024-11-27) happen.  Recently, there's
some similar but yet-unidentified problem causing similar symptoms (attempts
to build sanitizer code in compiler-rt that's not yet supported, e.g.).

Instead, let's just build the stuff we need by specifying the right target.

Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
@androm3da androm3da force-pushed the bcain/cachefiles_n_testing branch from b6750a3 to e216065 Compare January 23, 2025 14:35
@quic-mathbern quic-mathbern self-requested a review January 23, 2025 16:33
@androm3da androm3da merged commit 1499227 into master Jan 23, 2025
2 checks passed
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