Skip to content

Commit d0a71c6

Browse files
author
Siva Chandra
committed
[runtimes] Add the libc project to the list of runtimes.
This is possible as the default libc build now works under runtimes build. Differential Revision: https://reviews.llvm.org/D99101
1 parent 2c6710a commit d0a71c6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

llvm/runtimes/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# build, see runtimes/CMakeLists.txt, except that we currently check whether
88
# compiler-rt is being built to determine whether to first build builtins
99
# or not so we need that information in this file as well.
10-
set(LLVM_ALL_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind;openmp")
10+
set(LLVM_ALL_RUNTIMES "compiler-rt;libc;libcxx;libcxxabi;libunwind;openmp")
1111
set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
1212
"Semicolon-separated list of runtimes to build (${LLVM_ALL_RUNTIMES}), or \"all\".")
1313
if(LLVM_ENABLE_RUNTIMES STREQUAL "all" )
@@ -166,6 +166,12 @@ endif()
166166
# for all variables that will apply to runtimes.
167167
foreach(entry ${runtimes})
168168
get_filename_component(projName ${entry} NAME)
169+
if(projName STREQUAL "libc")
170+
# For now, we will use the name "llvmlibc" for the libc project as it is
171+
# not a full libc yet. Also, if we leave it as is, the "lib" prefix gets
172+
# stripped below and the targets endup having the name "c", "check-c" etc.
173+
set(projName "llvmlibc")
174+
endif()
169175
string(REPLACE "-" "_" canon_name ${projName})
170176
string(TOUPPER ${canon_name} canon_name)
171177
list(APPEND prefixes ${canon_name})

runtimes/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
cmake_minimum_required(VERSION 3.13.4)
33
project(Runtimes C CXX ASM)
44

5-
set(LLVM_ALL_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind;openmp")
5+
set(LLVM_ALL_RUNTIMES "compiler-rt;libc;libcxx;libcxxabi;libunwind;openmp")
66
set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
77
"Semicolon-separated list of runtimes to build (${LLVM_ALL_RUNTIMES}), or \"all\".")
88
if(LLVM_ENABLE_RUNTIMES STREQUAL "all" )

0 commit comments

Comments
 (0)