Skip to content

Commit e2c259d

Browse files
drop LLVM_ prefix from option name
1 parent d918f85 commit e2c259d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

libc/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ set(LIBC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
4646

4747
set(LIBC_ENABLE_USE_BY_CLANG OFF CACHE BOOL "Whether or not to place libc in a build directory findable by a just built clang")
4848

49-
# LLVM_LIBC_USE_HOST_KERNEL_HEADERS is brittle, and frowned upon (prefer
49+
# LIBC_USE_HOST_KERNEL_HEADERS is brittle, and frowned upon (prefer
5050
# setting LIBC_KERNEL_HEADERS), but is simpler from a hello world linux host
5151
# build.
52-
set(LLVM_LIBC_USE_HOST_KERNEL_HEADERS OFF CACHE BOOL "Add /usr/include to the header seach path")
52+
set(LIBC_USE_HOST_KERNEL_HEADERS OFF CACHE BOOL "Add /usr/include to the header seach path")
5353
set(LIBC_KERNEL_HEADERS "" CACHE STRING "Path to Linux kernel headers")
5454

5555
# Defining a global namespace to enclose all libc functions.

libc/cmake/modules/LLVMLibCArchitectures.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,22 +217,22 @@ if (LIBC_TARGET_OS_IS_WINDOWS AND LLVM_LIBC_FULL_BUILD)
217217
endif ()
218218

219219
if (LIBC_TARGET_OS_IS_LINUX)
220-
if (NOT LLVM_LIBC_USE_HOST_KERNEL_HEADERS AND NOT LIBC_KERNEL_HEADERS STREQUAL "")
221-
message(FATAL_ERROR "MUST specify either LIBC_KERNEL_HEADERS or LLVM_LIBC_USE_HOST_KERNEL_HEADERS")
220+
if (NOT LIBC_USE_HOST_KERNEL_HEADERS AND "${LIBC_KERNEL_HEADERS}" STREQUAL "")
221+
message(FATAL_ERROR "MUST specify either LIBC_KERNEL_HEADERS or LIBC_USE_HOST_KERNEL_HEADERS")
222222
endif()
223-
if (LLVM_LIBC_USE_HOST_KERNEL_HEADERS AND NOT LIBC_KERNEL_HEADERS STREQUAL "")
224-
message(FATAL_ERROR "LLVM_LIBC_USE_HOST_KERNEL_HEADERS and LIBC_USE_HOST_KERNEL_HEADERS are mutually exclusive")
223+
if (LIBC_USE_HOST_KERNEL_HEADERS AND NOT "${LIBC_KERNEL_HEADERS}" STREQUAL "")
224+
message(FATAL_ERROR "LIBC_USE_HOST_KERNEL_HEADERS and LIBC_USE_HOST_KERNEL_HEADERS are mutually exclusive")
225225
endif()
226-
if(LIBC_TARGET_TRIPLE AND LLVM_LIBC_USE_HOST_KERNEL_HEADERS)
226+
if(LIBC_TARGET_TRIPLE AND LIBC_USE_HOST_KERNEL_HEADERS)
227227
# This is because the syscall numbers are frequently different between
228228
# different target architectures. Code may compile, but you'll get spooky
229229
# runtime failures.
230-
message(FATAL_ERROR "LLVM_LIBC_USE_HOST_KERNEL_HEADERS should not be set when using LIBC_TARGET_TRIPLE, set LIBC_KERNEL_HEADERS instead")
230+
message(FATAL_ERROR "LIBC_USE_HOST_KERNEL_HEADERS should not be set when using LIBC_TARGET_TRIPLE, set LIBC_KERNEL_HEADERS instead")
231231
endif()
232-
if (NOT LIBC_KERNEL_HEADERS STREQUAL "" AND NOT IS_DIRECTORY LIBC_KERNEL_HEADERS)
232+
if (NOT "${LIBC_KERNEL_HEADERS}" STREQUAL "" AND NOT IS_DIRECTORY "${LIBC_KERNEL_HEADERS}")
233233
message(FATAL_ERROR "LIBC_KERNEL_HEADERS should be a path to an existing directory")
234234
endif()
235-
if (LLVM_LIBC_USE_HOST_KERNEL_HEADERS)
235+
if (LIBC_USE_HOST_KERNEL_HEADERS)
236236
set(LIBC_KERNEL_HEADERS "/usr/include" CACHE STRING "Path to Linux kernel headers" FORCE)
237237
endif()
238238
endif()

libc/docs/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Install dependencies first:
2020
-DCMAKE_BUILD_TYPE=Debug \
2121
-DCMAKE_CXX_COMPILER=clang++ \
2222
-DCMAKE_C_COMPILER=clang \
23+
-DLIBC_USE_HOST_KERNEL_HEADERS=ON \
2324
-DLLVM_LIBC_FULL_BUILD=ON \
24-
-DLLVM_LIBC_USE_HOST_KERNEL_HEADERS=ON \
2525
-DLLVM_LIBC_INCLUDE_SCUDO=ON \
2626
-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON \
2727
-DCOMPILER_RT_BUILD_GWP_ASAN=OFF \

0 commit comments

Comments
 (0)