@@ -859,7 +859,7 @@ function(
859
859
# Exceptions are architectures pre-armv7, which compiler-rt expects to
860
860
# see in the triple because that's where it looks to decide whether to
861
861
# use specific assembly sources.
862
- if (NOT target_triple MATCHES "^(aarch64-none-unknown- elf|arm-none-unknown -eabi|armv[4-6])" )
862
+ if (NOT target_triple MATCHES "^(aarch64-none-elf|arm-none-eabi|armv[4-6])" )
863
863
message (FATAL_ERROR "\
864
864
Target triple name \" ${target_triple} \" not compatible with compiler-rt.
865
865
Use -march to specify the architecture." )
@@ -870,6 +870,7 @@ Use -march to specify the architecture.")
870
870
message (FATAL_ERROR "\
871
871
Hard-float library with target triple \" ${target_triple} \" must end \" -eabihf\" " )
872
872
endif ()
873
+ string (REPLACE "-none-" "-none-unknown-" normalized_target_triple ${target_triple} )
873
874
874
875
get_runtimes_flags("${directory} " "${flags} " )
875
876
@@ -930,7 +931,7 @@ Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\""
930
931
COMMAND
931
932
${CMAKE_COMMAND}
932
933
-E copy_directory
933
- <INSTALL_DIR>/lib/${target_triple }
934
+ <INSTALL_DIR>/lib/${normalized_target_triple }
934
935
"${LLVM_BINARY_DIR} /${directory} /lib"
935
936
)
936
937
@@ -1081,7 +1082,7 @@ endfunction()
1081
1082
1082
1083
function (get_compiler_rt_target_triple target_arch flags )
1083
1084
if (target_arch STREQUAL "aarch64" )
1084
- set (target_triple "aarch64-none-unknown- elf" )
1085
+ set (target_triple "aarch64-none-elf" )
1085
1086
else ()
1086
1087
# Choose the target triple so that compiler-rt will do the
1087
1088
# right thing. We can't always put the exact target
@@ -1093,9 +1094,9 @@ function(get_compiler_rt_target_triple target_arch flags)
1093
1094
# see in the triple because that's where it looks to decide whether to
1094
1095
# use specific assembly sources.
1095
1096
if (target_arch MATCHES "^armv[4-6]" )
1096
- set (target_triple "${target_arch} -none-unknown- eabi" )
1097
+ set (target_triple "${target_arch} -none-eabi" )
1097
1098
else ()
1098
- set (target_triple "arm-none-unknown- eabi" )
1099
+ set (target_triple "arm-none-eabi" )
1099
1100
endif ()
1100
1101
if (flags MATCHES "-mfloat-abi=hard" )
1101
1102
# Also, compiler-rt looks in the ABI component of the
0 commit comments