To remove the dependency on libgcc_s_dw2-1.dll in the cmake file, you can modify the CMAKE_C_FLAGS variable.

Replace the line: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings")

with: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wwrite-strings -static-libgcc")

This will add the flag -static-libgcc to the CMAKE_C_FLAGS variable, which will statically link libgcc into the executable, removing the dependency on libgcc_s_dw2-1.dll.

cmake_minimum_requiredVERSION 26ifTEST_CPP projectmbed TLS C CXXelse projectmbed TLS CendifoptionUSE_PKCS11_HELPER_LIBRARY Build mbed TLS with the pkcs11-helper library OFFoptionENABLE_ZLIB_SUPP