Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile with code coverage enabled (#398)
When building Amplitude as a Swift Package Manager dependency for an XCode project with code coverage enabled (https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/07-code_coverage.html), the build fails. It fails with an error ``` Undefined symbols for architecture x86_64: "___llvm_profile_runtime", referenced from: ___llvm_profile_runtime_user in Amplitude.o ``` You can resolve this error by passing the `-fprofile-instr-generate` flag to clang (https://clang.llvm.org/docs/SourceBasedCodeCoverage.html). Unfortunately, this flag must be passed to the Amplitude dependency directly (rather than being applied to the project that relies on Amplitude, e.g.) That is what this commit does.
- Loading branch information