Add a SWIFT_STDLIB_HAS_DARWIN_ASL config flag to allow removing asl_log() usage in freestanding build (#39584)

This commit is contained in:
Kuba (Brecka) Mracek
2021-10-12 07:14:33 -07:00
committed by GitHub
parent 75b57ea02d
commit 653642df75
7 changed files with 26 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ void error(const char *fmt, ...) {
vsnprintf(buffer, sizeof(buffer), fmt, argp);
va_end(argp);
#if defined(__APPLE__)
#if SWIFT_STDLIB_HAS_ASL
asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", buffer);
#elif defined(__ANDROID__)
__android_log_print(ANDROID_LOG_FATAL, "SwiftRuntime", "%s", buffer);