Skip to content

Commit efc999f

Browse files
committed
Try to fix target if condition. Update cache file.
1 parent f5797ba commit efc999f

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ jobs:
114114
-DCOMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED=OFF"
115115
fi
116116
117-
if [[ ${{ contains(matrix.target, '-none-') }} ]]; then
118-
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
117+
if [[ ${{ endsWith(matrix.target, '-none-eabi') }} ]]; then
118+
cmake -B ${{ steps.strings.outputs.build-baremetal-output-dir }} \
119119
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
120120
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
121121
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
122122
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
123123
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
124-
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }} \
124+
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-baremetal-install-dir }} \
125125
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
126126
-DCMAKE_C_COMPILER_TARGET=${{ matrix.target }} \
127127
-DCMAKE_CXX_COMPILER_TARGET=${{ matrix.target }} \
@@ -154,7 +154,7 @@ jobs:
154154
155155
- name: Test
156156
# Skip UEFI tests until we have testing set up.
157-
if: ${{ ! endsWith(matrix.target, '-uefi-llvm') }} && ${{ ! contains(matrix.target, '-none-') }}
157+
if: ${{ ! endsWith(matrix.target, '-uefi-llvm') }} && ${{ ! endsWith(matrix.target, '-none-eabi') }}
158158
run: >
159159
cmake
160160
--build ${{ steps.strings.outputs.build-output-dir }}
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
set(CMAKE_SYSTEM_NAME Generic CACHE STRING "")
2+
set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
3+
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
14
set(LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
5+
set(LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
6+
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
27
set(LLVM_LIBC_FULL_BUILD "ON" CACHE BOOL "")
8+
set(LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
39
set(CMAKE_C_COMPILER_WORKS ON CACHE BOOL "")
410
set(CMAKE_CXX_COMPILER_WORKS ON CACHE BOOL "")
5-
set(CMAKE_C_FLAGS "-mfloat-abi=soft -mthumb" CACHE STRING "")
6-
set(CMAKE_CXX_FLAGS "-mfloat-abi=soft -mthumb" CACHE STRING "")
711
set(CMAKE_SYSROOT "" CACHE STRING "")
8-
set(CMAKE_SYSTEM_NAME Generic CACHE STRING "")
9-
set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
1012

11-
set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
13+
set(LLVM_LIBC_INCLUDE_SCUDO OFF CACHE BOOL "")
14+
15+
foreach(lang C;CXX;ASM)
16+
set(CMAKE_${lang}_FLAGS "-march=armv6m -mcpu=cortex-m0plus -mfloat-abi=soft -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dfputs(string, stream)=puts(string)\" -D_LIBCPP_PRINT=1" CACHE STRING "")
17+
endforeach()

0 commit comments

Comments
 (0)