[Serialization] Serialize the SDK path and -Xcc arguments for an app.

...so that the debugger has the best possible chance of being able to load
the app properly.

We don't do this for frameworks today because we don't want to leak this
information into the public module; once we have a distinction between
"the module that ships with the framework" and "the module that goes into
the debug info" we can do this for frameworks as well.

Part of rdar://problem/17670778

Swift SVN r25204
This commit is contained in:
Jordan Rose
2015-02-11 23:07:48 +00:00
parent b6a247cf06
commit de8a05b293
10 changed files with 200 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
/// To ensure that two separate changes don't silently get merged into one
/// in source control, you should also update the comment to briefly
/// describe what change you made.
const uint16_t VERSION_MINOR = 171; // Last change: Thunk flag in SILFunction.
const uint16_t VERSION_MINOR = 172; // Last change: Compilation options.
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -344,6 +344,12 @@ enum BlockID {
/// \sa sil_index_block
SIL_INDEX_BLOCK_ID,
/// A sub-block of the control block that contains configuration options
/// needed to successfully load this module.
///
/// \sa options_block
OPTIONS_BLOCK_ID,
/// The module documentation container block, which contains all other
/// documentation blocks.
MODULE_DOC_BLOCK_ID = 96,
@@ -384,6 +390,29 @@ namespace control_block {
>;
}
/// The record types within the options block (a sub-block of the control
/// block).
///
/// \sa OPTIONS_BLOCK_ID
namespace options_block {
// These IDs must \em not be renumbered or reordered without incrementing
// VERSION_MAJOR.
enum {
SDK_PATH = 1,
XCC
};
using SDKPathLayout = BCRecordLayout<
SDK_PATH,
BCBlob // path
>;
using XCCLayout = BCRecordLayout<
XCC,
BCBlob // -Xcc flag, as string
>;
}
/// The record types within the input block.
///
/// \sa INPUT_BLOCK_ID