-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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] Add hexagon-linux cmake cache files #98712
Open
androm3da
wants to merge
1
commit into
llvm:main
Choose a base branch
from
androm3da:bcain/hex_cmake_cache
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+74
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
clang/cmake/caches/hexagon-unknown-linux-musl-clang-cross.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This file is for the llvm+clang options that are specific to building | ||
# a cross-toolchain targeting hexagon linux. | ||
set(DEFAULT_SYSROOT "../target/hexagon-unknown-linux-musl/" CACHE STRING "") | ||
set(CLANG_LINKS_TO_CREATE | ||
hexagon-linux-musl-clang++ | ||
hexagon-linux-musl-clang | ||
hexagon-unknown-linux-musl-clang++ | ||
hexagon-unknown-linux-musl-clang | ||
hexagon-none-elf-clang++ | ||
hexagon-none-elf-clang | ||
hexagon-unknown-none-elf-clang++ | ||
hexagon-unknown-none-elf-clang | ||
CACHE STRING "") | ||
|
||
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
set(LLVM_TARGETS_TO_BUILD "Hexagon" CACHE STRING "") | ||
set(LLVM_DEFAULT_TARGET_TRIPLE "hexagon-unknown-linux-musl" CACHE STRING "") | ||
set(CLANG_DEFAULT_CXX_STDLIB "libc++" CACHE STRING "") | ||
set(CLANG_DEFAULT_OBJCOPY "llvm-objcopy" CACHE STRING "") | ||
set(CLANG_DEFAULT_RTLIB "compiler-rt" CACHE STRING "") | ||
set(CLANG_DEFAULT_UNWINDLIB "libunwind" CACHE STRING "") | ||
set(CLANG_DEFAULT_LINKER "lld" CACHE STRING "") | ||
set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "") | ||
|
||
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") | ||
# Enabling toolchain-only causes problems when doing some of the | ||
# subsequent builds, will need to investigate: | ||
set(LLVM_INSTALL_TOOLCHAIN_ONLY OFF CACHE BOOL "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set(CMAKE_ASM_FLAGS "-G0 -mlong-calls -fno-pic" CACHE STRING "") | ||
|
||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "") | ||
set(LLVM_TARGET_TRIPLE hexagon-unknown-linux-musl CACHE STRING "") | ||
set(COMPILER_RT_DEFAULT_TARGET_TRIPLE hexagon-unknown-linux-musl CACHE STRING "") | ||
set(COMPILER_RT_BUILD_BUILTINS ON CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_PROFILE OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_MEMPROF OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_ORC OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_GWP_ASAN OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILTINS_ENABLE_PIC OFF CACHE BOOL "") | ||
set(COMPILER_RT_SUPPORTED_ARCH hexagon CACHE STRING "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "") | ||
set(LLVM_DEFAULT_TARGET_TRIPLE hexagon-unknown-linux-musl CACHE STRING "") | ||
|
||
set(COMPILER_RT_USE_LLVM_UNWINDER ON CACHE BOOL "") | ||
|
||
# Some build failures here, including the inline asm in | ||
# `compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h`, so | ||
# we can just disable these for now: | ||
set(COMPILER_RT_BUILD_BUILTINS OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_SANITIZERS OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "") | ||
set(COMPILER_RT_BUILD_MEMPROF OFF CACHE BOOL "") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "") | ||
set(LLVM_ENABLE_RUNTIMES libcxx;libcxxabi;libunwind;compiler-rt CACHE STRING "") | ||
set(LIBCXX_INCLUDE_BENCHMARKS OFF CACHE BOOL "") | ||
set(LIBCXX_HAS_MUSL_LIBC ON CACHE BOOL "") | ||
set(LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(LIBCXXABI_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(LIBUNWIND_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(LIBCXX_CXX_ABI libcxxabi CACHE STRING "") | ||
set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") | ||
set(LIBCXXABI_ENABLE_SHARED ON CACHE BOOL "") | ||
|
||
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") | ||
set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") | ||
set(LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Meta comment: As part of our support policy, we would like to have a CI job that builds and tests libc++ for Hexagon. I'm not very familiar with that target, but do you think you could set that up?
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.
IMO landing these cache files are baby steps towards having such a CI job. I'll look into what it would take, yes.
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.
Ack. Just be aware that so long as there's no CI job, the platform is not officially supported so it may happen that we'll make changes that will make your life harder. We won't do it on purpose, of course, but it could happen because "no CI" == "no visibility into the impact of changes for that configuration".
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.
Absolutely. That's been the status quo and this PR on its own can't change that.
The intent of this pull req is to allow anyone to build a toolchain for targeting hexagon (of which libc++, libc++abi, libunwind are a part). But another benefit can be that we should be able to setup CI job(s) leveraging this, indeed. We can enable regression tests for the entire toolchain including compiler, linker and target libraries.