cmake-modules
cmake-modules copied to clipboard
CodeCoverage with Xcode (Clang): Undefined symbols for architecture x86_64
During the linking phase of my GitHub action, I encounter the following errors while using Xcode 14.2 (Clang) (not on Linux/Ubuntu):
[100%] Linking CXX executable [NAME]
Undefined symbols for architecture x86_[64]
"_llvm_gcda_emit_arcs", referenced from:
___llvm_gcov_writeout in [FILE.o]
...
"_llvm_gcda_emit_function", referenced from:
___llvm_gcov_writeout in test.[FILE.o]
...
"_llvm_gcda_end_file", referenced from:
___llvm_gcov_writeout in in test.[FILE.o]
...
"_llvm_gcda_start_file", referenced from:
___llvm_gcov_writeout in in test.[FILE.o]
...
"_llvm_gcda_summary_info", referenced from:
___llvm_gcov_writeout in in test.[FILE.o]
...
"_llvm_gcov_init", referenced from:
___llvm_gcov_init in in test.[FILE.o]
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like that something is missing during the linking phase (maybe a flag ?). Any thoughts? Thanks 🥳
Same issue here😥
How can I solve this in my CI?