Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -78,6 +78,11 @@ set(TEST_SUITE_RUN_TYPE "train" CACHE STRING "Type of benchmark inputs (may be test,train or ref)") +# Setup default strip tool used by 'lit' +if(NOT DEFINED CMAKE_STRIP) + set (CMAKE_STRIP "strip") +endif() + # Enable profile generate mode in lit. Note that this does not automatically # add something like -fprofile-instr-generate to the compiler flags. set(TEST_SUITE_PROFILE_GENERATE "FALSE" CACHE BOOL Index: lit.site.cfg.in =================================================================== --- lit.site.cfg.in +++ lit.site.cfg.in @@ -7,6 +7,7 @@ config.remote_user = "@TEST_SUITE_REMOTE_USER@" config.remote_port = "@TEST_SUITE_REMOTE_PORT@" config.run_under = "@TEST_SUITE_RUN_UNDER@" +config.strip_tool = "@CMAKE_STRIP@" config.profile_generate = @TEST_SUITE_PROFILE_GENERATE@ config.llvm_profdata = "@TEST_SUITE_LLVM_PROFDATA@" Index: litsupport/hash.py =================================================================== --- litsupport/hash.py +++ litsupport/hash.py @@ -15,7 +15,7 @@ if platform.system() != 'Darwin': stripped_executable = executable + '.stripped' shutil.copyfile(executable, stripped_executable) - subprocess.check_call(['strip', + subprocess.check_call([context.config.strip_tool, '--remove-section=.comment', "--remove-section='.note*'", stripped_executable])