diff --git a/CMakeLists.txt b/CMakeLists.txt index 198dae5..e172ee2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,12 @@ add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") add_link_options("-Wno-unused-command-line-argument") + find_program(LLVM_OBJCOPY llvm-objcopy) + if(LLVM_OBJCOPY) + set(CMAKE_OBJCOPY + ${LLVM_OBJCOPY} + CACHE FILEPATH "path to objcopy binary" FORCE) + endif() endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")