mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
Allow the OSLog module to specify the log string section name
When building the `OSLog` module, look for a variable named
`osLogStringSectionName`. It must have a string literal as its
initializer, which provides the section name where the log strings
should be emitted. The `OSLog` module should contain something like
this:
let osLogStringSectionName = "__TEXT,__logit"
When not present, the compiler will default to
`__TEXT,__oslogstring,cstring_literals`, which was previously the
hardcoded section name. Now, OSLog can customize the name.
Implements rdar://171571056
This commit is contained in:
@@ -983,6 +983,8 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
|
||||
M.setABIName(Ctx.getIdentifier(loadedModuleFile->getModuleABIName()));
|
||||
if (!loadedModuleFile->getPublicModuleName().empty())
|
||||
M.setPublicModuleName(Ctx.getIdentifier(loadedModuleFile->getPublicModuleName()));
|
||||
if (!loadedModuleFile->getOSLogStringSectionName().empty())
|
||||
Ctx.LangOpts.OSLogStringSectionName = loadedModuleFile->getOSLogStringSectionName();
|
||||
if (loadedModuleFile->isConcurrencyChecked())
|
||||
M.setIsConcurrencyChecked();
|
||||
if (loadedModuleFile->strictMemorySafety())
|
||||
|
||||
Reference in New Issue
Block a user