mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ParseableInterface] Add module arguments if using supplemental output maps
Currently, the check for whether to serialize parseable interface arguments doesn't handle the case where a supplementary output file map is used, preferring only to check if the frontend is passed `-emit*interface`. Instead, check if the frontend inputs and outputs contains a parseable interface, and use that to determine if we need to save args. This also puts `-module-link-name` in the parseable interface arg list.
This commit is contained in:
@@ -507,14 +507,16 @@ createFromTypeToPathMap(const TypeToPathMap *map) {
|
||||
|
||||
Optional<std::vector<SupplementaryOutputPaths>>
|
||||
SupplementaryOutputPathsComputer::readSupplementaryOutputFileMap() const {
|
||||
if (Arg *A = Args.getLastArg(options::OPT_emit_objc_header_path,
|
||||
options::OPT_emit_module_path,
|
||||
options::OPT_emit_module_doc_path,
|
||||
options::OPT_emit_dependencies_path,
|
||||
options::OPT_emit_reference_dependencies_path,
|
||||
options::OPT_serialize_diagnostics_path,
|
||||
options::OPT_emit_loaded_module_trace_path,
|
||||
options::OPT_emit_tbd_path)) {
|
||||
if (Arg *A = Args.getLastArg(
|
||||
options::OPT_emit_objc_header_path,
|
||||
options::OPT_emit_module_path,
|
||||
options::OPT_emit_module_doc_path,
|
||||
options::OPT_emit_dependencies_path,
|
||||
options::OPT_emit_reference_dependencies_path,
|
||||
options::OPT_serialize_diagnostics_path,
|
||||
options::OPT_emit_loaded_module_trace_path,
|
||||
options::OPT_emit_parseable_module_interface_path,
|
||||
options::OPT_emit_tbd_path)) {
|
||||
Diags.diagnose(SourceLoc(),
|
||||
diag::error_cannot_have_supplementary_outputs,
|
||||
A->getSpelling(), "-supplementary-output-file-map");
|
||||
|
||||
Reference in New Issue
Block a user