Skip to content

Commit 94b3805

Browse files
allow -emit-symbol-graph-dir and -supplementary-output-file-map at the same time
1 parent 129fca6 commit 94b3805

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lib/Frontend/ArgsToFrontendOutputsConverter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,7 @@ SupplementaryOutputPathsComputer::readSupplementaryOutputFileMap() const {
597597
options::OPT_emit_private_module_interface_path,
598598
options::OPT_emit_module_source_info_path,
599599
options::OPT_emit_tbd_path,
600-
options::OPT_emit_ldadd_cfile_path,
601-
options::OPT_emit_symbol_graph_dir)) {
600+
options::OPT_emit_ldadd_cfile_path)) {
602601
Diags.diagnose(SourceLoc(),
603602
diag::error_cannot_have_supplementary_outputs,
604603
A->getSpelling(), "-supplementary-output-file-map");

test/SymbolGraph/EmitWhileBuilding.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/ -emit-symbol-graph -emit-symbol-graph-dir %t/
2+
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/
33
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json
44

55
// also try without the trailing slash on `-emit-symbol-graph-dir` and make sure it works
66

77
// RUN: %empty-directory(%t)
8-
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/ -emit-symbol-graph -emit-symbol-graph-dir %t
8+
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t
9+
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json
10+
11+
// also try while forcing the use of supplementary file maps to make sure the symbol graph path gets
12+
// added to the file map for the inner frontend call
13+
14+
// RUN: %empty-directory(%t)
15+
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/EmitWhileBuilding.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t -driver-filelist-threshold=0 -O -whole-module-optimization
916
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json
1017

1118
/// Does a foo.

0 commit comments

Comments
 (0)