Index: llvm/cmake/modules/AddLLVM.cmake =================================================================== --- llvm/cmake/modules/AddLLVM.cmake +++ llvm/cmake/modules/AddLLVM.cmake @@ -1546,7 +1546,7 @@ if(APPLE) set(strip_command COMMAND xcrun strip -Sxl $) else() - set(strip_command COMMAND strip -gx $) + set(strip_command COMMAND ${CMAKE_STRIP} -gx $) endif() endif() @@ -1564,9 +1564,9 @@ ) else() add_custom_command(TARGET ${name} POST_BUILD - COMMAND objcopy --only-keep-debug $ $.debug + COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $ $.debug ${strip_command} -R .gnu_debuglink - COMMAND objcopy --add-gnu-debuglink=$.debug $ + COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$.debug $ ) endif() endfunction()