Skip to content

Commit 089f988

Browse files
committed
[libc] Fix defaulting the full build
Summary: This was missing the architecture macros as they were defined just below.
1 parent 4b29c28 commit 089f988

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

libc/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ else()
128128
endif()
129129
endif()
130130

131+
# Defines LIBC_TARGET_ARCHITECTURE and associated macros.
132+
set(LIBC_TARGET_TRIPLE "" CACHE STRING "The target triple for the libc build.")
133+
include(LLVMLibCArchitectures)
134+
131135
# Some targets can only support the full build.
132136
set(default_to_full_build OFF)
133137
if(LIBC_TARGET_OS_IS_GPU)
@@ -138,16 +142,11 @@ option(LLVM_LIBC_FULL_BUILD "Build and test LLVM libc as if it is the full libc"
138142
option(LLVM_LIBC_IMPLEMENTATION_DEFINED_TEST_BEHAVIOR "Build LLVM libc tests assuming our implementation-defined behavior" ON)
139143
option(LLVM_LIBC_ENABLE_LINTING "Enables linting of libc source files" OFF)
140144

141-
set(LIBC_TARGET_TRIPLE "" CACHE STRING "The target triple for the libc build.")
142-
143145
option(LIBC_CONFIG_PATH "The path to user provided folder that configures the build for the target system." OFF)
144146

145147
set(LIBC_ENABLE_UNITTESTS ON)
146148
set(LIBC_ENABLE_HERMETIC_TESTS ${LLVM_LIBC_FULL_BUILD})
147149

148-
# Defines LIBC_TARGET_ARCHITECTURE and associated macros.
149-
include(LLVMLibCArchitectures)
150-
151150
set(LIBC_CONFIG_JSON_FILE_LIST "")
152151

153152
if(NOT LIBC_CONFIG_PATH)

0 commit comments

Comments
 (0)