@@ -108,24 +108,24 @@ set(LIBC_TARGET_ARCHITECTURE ${compiler_arch})
108108set (LIBC_TARGET_OS ${compiler_sys} )
109109set (LIBC_CROSSBUILD FALSE )
110110
111- # One should not set LLVM_DEFAULT_TARGET_TRIPLE and LIBC_TARGET_TRIPLE
112- if (LLVM_DEFAULT_TARGET_TRIPLE AND LLVM_RUNTIMES_BUILD AND LIBC_TARGET_TRIPLE)
111+ # One should not set LLVM_RUNTIMES_TARGET and LIBC_TARGET_TRIPLE
112+ if (LLVM_RUNTIMES_TARGET AND LIBC_TARGET_TRIPLE)
113113 message (FATAL_ERROR
114- "libc build: Specify only LLVM_DEFAULT_TARGET_TRIPLE if you are doing a "
114+ "libc build: Specify only LLVM_RUNTIMES_TARGET if you are doing a "
115115 "runtimes/bootstrap build. If you are doing a standalone build, "
116116 "specify only LIBC_TARGET_TRIPLE." )
117117endif ()
118118
119119set (explicit_target_triple)
120- if (LLVM_DEFAULT_TARGET_TRIPLE AND LLVM_RUNTIMES_BUILD )
121- set (explicit_target_triple ${LLVM_DEFAULT_TARGET_TRIPLE } )
120+ if (LLVM_RUNTIMES_TARGET )
121+ set (explicit_target_triple ${LLVM_RUNTIMES_TARGET } )
122122elseif (LIBC_TARGET_TRIPLE)
123123 set (explicit_target_triple ${LIBC_TARGET_TRIPLE} )
124124endif ()
125125
126126# The libc's target architecture and OS are set to match the compiler's default
127127# target triple above. However, one can explicitly set LIBC_TARGET_TRIPLE or
128- # LLVM_DEFAULT_TARGET_TRIPLE (for runtimes/bootstrap build). If one of them is set,
128+ # LLVM_RUNTIMES_TARGET (for runtimes/bootstrap build). If one of them is set,
129129# then we will use that target triple to deduce libc's target OS and
130130# architecture.
131131if (explicit_target_triple)
@@ -200,14 +200,14 @@ endif()
200200
201201
202202# If the compiler target triple is not the same as the triple specified by
203- # LIBC_TARGET_TRIPLE or LLVM_DEFAULT_TARGET_TRIPLE , we will add a --target option
203+ # LIBC_TARGET_TRIPLE or LLVM_RUNTIMES_TARGET , we will add a --target option
204204# if the compiler is clang. If the compiler is GCC we just error out as there
205205# is no equivalent of an option like --target.
206206if (explicit_target_triple AND
207207 (NOT (libc_compiler_triple STREQUAL explicit_target_triple)))
208208 set (LIBC_CROSSBUILD TRUE )
209209 if (CMAKE_COMPILER_IS_GNUCXX)
210- message (WARNING
210+ message (FATAL_ERROR
211211 "GCC target triple (${libc_compiler_triple} ) and the explicity "
212212 "specified target triple (${explicit_target_triple} ) do not match." )
213213 else ()
0 commit comments