-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[libc][Github] Perform baremetal libc builds #167583
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
Conversation
Currently there are no 32 bit presubmit builds for libc. This PR performs 32 bit build only (no test) to check any changes that land in libc break 32 bit builds.
|
@llvm/pr-subscribers-github-workflow Author: Prabhu Rajasekaran (Prabhuk) ChangesCurrently there are no 32 bit presubmit builds for libc. This PR Full diff: https://github.com/llvm/llvm-project/pull/167583.diff 1 Files Affected:
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index 3a048aeb9405b..dfa4c8e4c4764 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -24,30 +24,42 @@ jobs:
cpp_compiler: clang++-22
target: x86_64-unknown-linux-llvm
include_scudo: ON
+ enable_baremetal_build: OFF
- os: ubuntu-24.04
build_type: Release
c_compiler: clang-22
cpp_compiler: clang++-22
target: x86_64-unknown-linux-llvm
include_scudo: ON
+ enable_baremetal_build: OFF
- os: ubuntu-24.04
build_type: MinSizeRel
c_compiler: clang-22
cpp_compiler: clang++-22
target: x86_64-unknown-linux-llvm
include_scudo: ON
+ enable_baremetal_build: OFF
- os: ubuntu-24.04-arm
build_type: Debug
c_compiler: clang-22
cpp_compiler: clang++-22
target: aarch64-unknown-linux-llvm
include_scudo: ON
+ enable_baremetal_build: OFF
- os: ubuntu-24.04
build_type: Debug
c_compiler: clang-22
cpp_compiler: clang++-22
target: x86_64-unknown-uefi-llvm
include_scudo: OFF
+ enable_baremetal_build: OFF
+ - os: ubuntu-24.04
+ build__type: Release
+ c_compiler: clang-22
+ cpp_compiler: clang++-22
+ target: armv6m-none-eabi
+ include_scudo: OFF
+ enable_baremetal_build: ON
# TODO: add back gcc build when it is fixed
# - c_compiler: gcc
# cpp_compiler: g++
@@ -102,6 +114,18 @@ jobs:
-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF"
fi
+ if [[ ${{ matrix.enable_baremetal_build}} == "ON" ]]; then
+ export RUNTIMES="$RUNTIMES;libc"
+ export CMAKE_FLAGS="
+ -DCMAKE_BUILD_TYPE=Release
+ -DLLVM_LIBC_FULL_BUILD=ON
+ -DCMAKE_C_COMPILER_TARGET=armv6m-none-abi
+ -DCMAKE_CXX_COMPILER_TARGET=armv6m-none-abi
+ -DCMAKE_ASM_COMPILER_TARGET=armv6m-none-abi
+ -DCMAKE_C_FLAGS=-mfloat-abi=soft
+ -DCMAKE_CXX_FLAGS=-mfloat-abi=soft"
+ fi
+
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
|
|
@boomanaiden154 -- Not able to kick off armv6m config with my changes. Can you PTAL why? |
|
Invalid workflow definition https://github.com/Prabhuk/llvm-project/actions/runs/19280147652. You can see those kinds of failures in your forks actions page: https://github.com/Prabhuk/llvm-project/actions. |
|
Thank you @boomanaiden154 I'll try to address them next. |
Should be |
…s. Add more targets to build.
@boomanaiden154 -- which email address of yours should I use here? |
aidengrossman@google.com is what I'm using these days for my LLVM contributions. |
boomanaiden154
left a comment
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.
Github Actions changes LGTM.
It would be good for Petr to sign off on the CMake cache changes though. The flags you have to set for some of the ARM targets are a bit weird.
| target: x86_64-unknown-uefi-llvm | ||
| include_scudo: OFF | ||
| - os: ubuntu-24.04 | ||
| build__type: MinSizeRel |
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.
Is double underscore intended 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.
Definitely not. Thanks for catching this. I'll send a patch.
There is an extra underscore in build_type param in llvm#167583 patch. Fixing it in this PR.
There is an extra underscore in build_type param in #167583 patch. Fixing it in this PR.
Currently there are no 32 bit presubmit builds for libc. This PR
performs 32 bit build only (no test) to check any changes that land in
libc break 32 bit builds.
Co-authored-by: Aiden Grossman aidengrossman@google.com