@@ -108,24 +108,24 @@ set(LIBC_TARGET_ARCHITECTURE ${compiler_arch})
108
108
set (LIBC_TARGET_OS ${compiler_sys} )
109
109
set (LIBC_CROSSBUILD FALSE )
110
110
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)
113
113
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 "
115
115
"runtimes/bootstrap build. If you are doing a standalone build, "
116
116
"specify only LIBC_TARGET_TRIPLE." )
117
117
endif ()
118
118
119
119
set (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 } )
122
122
elseif (LIBC_TARGET_TRIPLE)
123
123
set (explicit_target_triple ${LIBC_TARGET_TRIPLE} )
124
124
endif ()
125
125
126
126
# The libc's target architecture and OS are set to match the compiler's default
127
127
# 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,
129
129
# then we will use that target triple to deduce libc's target OS and
130
130
# architecture.
131
131
if (explicit_target_triple)
@@ -200,14 +200,14 @@ endif()
200
200
201
201
202
202
# 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
204
204
# if the compiler is clang. If the compiler is GCC we just error out as there
205
205
# is no equivalent of an option like --target.
206
206
if (explicit_target_triple AND
207
207
(NOT (libc_compiler_triple STREQUAL explicit_target_triple)))
208
208
set (LIBC_CROSSBUILD TRUE )
209
209
if (CMAKE_COMPILER_IS_GNUCXX)
210
- message (WARNING
210
+ message (FATAL_ERROR
211
211
"GCC target triple (${libc_compiler_triple} ) and the explicity "
212
212
"specified target triple (${explicit_target_triple} ) do not match." )
213
213
else ()
0 commit comments