Skip to content

Commit bb47c6f

Browse files
committed
fixup! [ATFE] Add controls for layered runtime payloads
Rename ENABLE_LLVM_LIBC_MINOR_VARIANT to ENABLE_LLVMLIBC_MINOR_VARIANT and LLVM_LIBC_SUBARCHIVE_NAME to LLVMLIBC_SUBARCHIVE_NAME to consistent with the naming patterns used in the ATFE.
1 parent 20058e3 commit bb47c6f

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

arm-software/embedded/arm-runtimes/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ get_filename_component(llvmproject_src_dir_abs "${llvmproject_src_dir}" ABSOLUTE
2424
set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.")
2525
set_property(CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib newlib-nano llvmlibc)
2626

27-
set(ENABLE_LLVM_LIBC_MINOR_VARIANT_def OFF)
28-
set(LLVM_LIBC_SUBARCHIVE_NAME_def "")
27+
set(ENABLE_LLVMLIBC_MINOR_VARIANT_def OFF)
28+
set(LLVMLIBC_SUBARCHIVE_NAME_def "")
2929
set(ENABLE_LLVMLIBC_CORE_LIBS_def ON)
3030
set(ENABLE_LLVMLIBC_SUPPORT_LIBS_def ON)
3131
set(ENABLE_COMPILER_RT_LIBS_def ON)
@@ -106,8 +106,8 @@ set(ENABLE_COMPILER_RT_LIBS ${ENABLE_COMPILER_RT_LIBS_def} CACHE BOOL "Build com
106106
set(ENABLE_LIBC_TESTS ${ENABLE_LIBC_TESTS_def} CACHE BOOL "Enable libc tests (picolibc, newlib, newlib-nano or llvm-libc).")
107107
set(ENABLE_COMPILER_RT_TESTS ${ENABLE_COMPILER_RT_TESTS_def} CACHE BOOL "Enable compiler-rt tests.")
108108
set(ENABLE_LIBCXX_TESTS ${ENABLE_LIBCXX_TESTS_def} CACHE BOOL "Enable libcxx tests.")
109-
set(ENABLE_LLVM_LIBC_MINOR_VARIANT ${ENABLE_LLVM_LIBC_MINOR_VARIANT_def} CACHE BOOL "Install only the llvm-libc minor variant payload for this variant.")
110-
set(LLVM_LIBC_SUBARCHIVE_NAME ${LLVM_LIBC_SUBARCHIVE_NAME_def} CACHE STRING "llvm-libc subarchive to install when ENABLE_LLVM_LIBC_MINOR_VARIANT is enabled.")
109+
set(ENABLE_LLVMLIBC_MINOR_VARIANT ${ENABLE_LLVMLIBC_MINOR_VARIANT_def} CACHE BOOL "Install only the llvm-libc minor variant payload for this variant.")
110+
set(LLVMLIBC_SUBARCHIVE_NAME ${LLVMLIBC_SUBARCHIVE_NAME_def} CACHE STRING "llvm-libc subarchive to install when ENABLE_LLVMLIBC_MINOR_VARIANT is enabled.")
111111
set(ENABLE_LLVMLIBC_CORE_LIBS ${ENABLE_LLVMLIBC_CORE_LIBS_def} CACHE BOOL "Build and install the core llvm-libc library archives.")
112112
set(ENABLE_LLVMLIBC_SUPPORT_LIBS ${ENABLE_LLVMLIBC_SUPPORT_LIBS_def} CACHE BOOL "Build and install llvmlibc support libraries such as crt0 and semihost.")
113113
set(LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain root to build libraries with")
@@ -166,12 +166,12 @@ endif()
166166
# Some llvm-libc variants are packaged as minor layers. The subprojects
167167
# are still built as normal, but the installed payload is restricted to
168168
# the files that differ from the base layer.
169-
if(ENABLE_LLVM_LIBC_MINOR_VARIANT)
169+
if(ENABLE_LLVMLIBC_MINOR_VARIANT)
170170
if(NOT C_LIBRARY STREQUAL llvmlibc)
171-
message(FATAL_ERROR "ENABLE_LLVM_LIBC_MINOR_VARIANT is only supported with C_LIBRARY=llvmlibc.")
171+
message(FATAL_ERROR "ENABLE_LLVMLIBC_MINOR_VARIANT is only supported with C_LIBRARY=llvmlibc.")
172172
endif()
173-
if(NOT LLVM_LIBC_SUBARCHIVE_NAME)
174-
message(FATAL_ERROR "ENABLE_LLVM_LIBC_MINOR_VARIANT requires LLVM_LIBC_SUBARCHIVE_NAME to be set.")
173+
if(NOT LLVMLIBC_SUBARCHIVE_NAME)
174+
message(FATAL_ERROR "ENABLE_LLVMLIBC_MINOR_VARIANT requires LLVMLIBC_SUBARCHIVE_NAME to be set.")
175175
endif()
176176
endif()
177177
if(NOT ENABLE_COMPILER_RT_LIBS)
@@ -856,11 +856,11 @@ if(C_LIBRARY STREQUAL llvmlibc)
856856
# Let CMake know we're cross-compiling
857857
-DCMAKE_SYSTEM_NAME=Generic
858858
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
859-
-DLLVM_LIBC_ENABLE_MINOR_VARIANT=${ENABLE_LLVM_LIBC_MINOR_VARIANT}
860-
-DLLVM_LIBC_SUBARCHIVE_NAME=${LLVM_LIBC_SUBARCHIVE_NAME}
859+
-DLLVM_LIBC_ENABLE_MINOR_VARIANT=${ENABLE_LLVMLIBC_MINOR_VARIANT}
860+
-DLLVM_LIBC_SUBARCHIVE_NAME=${LLVMLIBC_SUBARCHIVE_NAME}
861861
)
862862

863-
if(ENABLE_LLVMLIBC_CORE_LIBS OR ENABLE_LLVM_LIBC_MINOR_VARIANT)
863+
if(ENABLE_LLVMLIBC_CORE_LIBS OR ENABLE_LLVMLIBC_MINOR_VARIANT)
864864
ExternalProject_Add(
865865
llvmlibc
866866
STAMP_DIR ${PROJECT_PREFIX}/llvmlibc/${VARIANT_BUILD_ID}/stamp

0 commit comments

Comments
 (0)