Skip to content

Commit 4cc6a08

Browse files
authored
Update LLVMLibCArchitectures.cmake (#112464)
Hi there, When building llvm-libc on the openEuler system, I encountered an issue as shown in the image below: ![image](https://github.com/user-attachments/assets/75667de4-5bea-4a95-be28-ed34db0e05b9) This issue happens because the regular expression used in `libc/cmake/modules/LLVMLibCArchitectures.cmake`: `string(REGEX MATCH "Target: [-_a-z0-9.]+[ \r\n]+")` does not handle capital letters properly in `openEuler`. To fix this, I modified the regular expression to: `string(REGEX MATCH "Target: [-_a-zA-Z0-9.]+[ \r\n]+")`. This change makes it compatible with capital letters.
1 parent bb89988 commit 4cc6a08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/cmake/modules/LLVMLibCArchitectures.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ if(NOT (libc_compiler_info_result EQUAL "0"))
8484
message(FATAL_ERROR "libc build: error querying compiler info from the "
8585
"compiler: ${libc_compiler_info}")
8686
endif()
87-
string(REGEX MATCH "Target: [-_a-z0-9.]+[ \r\n]+"
87+
string(REGEX MATCH "Target: [-_a-zA-Z0-9.]+[ \r\n]+"
8888
libc_compiler_target_info ${libc_compiler_info})
8989
if(NOT libc_compiler_target_info)
9090
message(FATAL_ERROR "libc build: could not read compiler target info from:\n"

0 commit comments

Comments
 (0)