| 12 | namespace strata::metal_engine { |
| 13 | |
| 14 | void missing(const char* name) { |
| 15 | static const bool log_only = [] { |
| 16 | const char* v = std::getenv("STRATA_METAL_STUBS"); |
| 17 | return v != nullptr && std::string(v) == "log"; |
| 18 | }(); |
| 19 | if (!log_only) { |
| 20 | std::fprintf(stderr, "strata metal: %s has no Metal implementation yet\n", name); |
| 21 | std::fflush(stderr); |
| 22 | std::_Exit(86); |
| 23 | } |
| 24 | static std::mutex mu; |
| 25 | static std::set<std::string> seen; |
| 26 | std::lock_guard<std::mutex> lk(mu); |
| 27 | if (seen.insert(name).second) std::fprintf(stderr, "strata metal: STUB %s\n", name); |
| 28 | } |
| 29 | |
| 30 | } // namespace strata::metal_engine |
| 31 |
no test coverage detected