diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake --- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake +++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake @@ -207,7 +207,8 @@ return() endif() - list(POP_FRONT flags flag) + list(GET flags 0 flag) + list(REMOVE_AT flags 0) extract_flag_modifier(${flag} real_flag modifier) if(NOT "${modifier}" STREQUAL "NO") diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake --- a/libc/cmake/modules/LLVMLibCObjectRules.cmake +++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake @@ -126,7 +126,8 @@ return() endif() - list(POP_FRONT flags flag) + list(GET flags 0 flag) + list(REMOVE_AT flags 0) extract_flag_modifier(${flag} real_flag modifier) if(NOT "${modifier}" STREQUAL "NO") @@ -441,7 +442,8 @@ return() endif() - list(POP_FRONT flags flag) + list(GET flags 0 flag) + list(REMOVE_AT flags 0) extract_flag_modifier(${flag} real_flag modifier) if(NOT "${modifier}" STREQUAL "NO") diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake --- a/libc/cmake/modules/LLVMLibCTestRules.cmake +++ b/libc/cmake/modules/LLVMLibCTestRules.cmake @@ -212,7 +212,8 @@ return() endif() - list(POP_FRONT flags flag) + list(GET flags 0 flag) + list(REMOVE_AT flags 0) extract_flag_modifier(${flag} real_flag modifier) if(NOT "${modifier}" STREQUAL "NO")