mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Allow one to separately specify the ABI name of a module.
Introduce a new compiler flag `-module-abi-name <name>` that uses the given name as the ABI name for the module (rather than the module's name in source code). The ABI name impacts name mangling and metadata.
This commit is contained in:
@@ -56,7 +56,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 602; // noasync apply
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 603; // module ABI name
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
@@ -790,7 +790,8 @@ namespace options_block {
|
||||
RESILIENCE_STRATEGY,
|
||||
ARE_PRIVATE_IMPORTS_ENABLED,
|
||||
IS_IMPLICIT_DYNAMIC_ENABLED,
|
||||
IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED
|
||||
IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED,
|
||||
MODULE_ABI_NAME,
|
||||
};
|
||||
|
||||
using SDKPathLayout = BCRecordLayout<
|
||||
@@ -828,6 +829,11 @@ namespace options_block {
|
||||
using IsAllowModuleWithCompilerErrorsEnabledLayout = BCRecordLayout<
|
||||
IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED
|
||||
>;
|
||||
|
||||
using ModuleABINameLayout = BCRecordLayout<
|
||||
MODULE_ABI_NAME,
|
||||
BCBlob
|
||||
>;
|
||||
}
|
||||
|
||||
/// The record types within the input block.
|
||||
|
||||
Reference in New Issue
Block a user