Skip to content

Commit

Permalink
Filter out -g from custom link command to avoid generating a dsym
Browse files Browse the repository at this point in the history
rdar://120814652
  • Loading branch information
adrian-prantl committed Jan 18, 2024
1 parent e38a71b commit 0750e0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ Searcher::CallbackReturn BreakpointResolverFileLine::SearchCallback(
for (size_t i = 0; i < num_comp_units; i++) {
CompUnitSP cu_sp(context.module_sp->GetCompileUnitAtIndex(i));
if (cu_sp) {
StreamString s;
cu_sp->GetDescription(&s, eDescriptionLevelBrief);
llvm::errs()<<s.GetString()<<"\n";
if (filter.CompUnitPasses(*cu_sp))
cu_sp->ResolveSymbolContext(m_location_spec, eSymbolContextEverything,
sc_list);
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/lang/swift/static_linking/macOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SWIFTFLAGS+=-sdk "$(SWIFTSDKROOT)"

$(EXE): objc_main.m A.o B.o
$(CC) $(CFLAGS) -c -I. $< -fobjc-arc -o $(BUILDDIR)/objc_main.o
$(SWIFTC) $(SWIFTFLAGS) -o $@ $(BUILDDIR)/objc_main.o $(BUILDDIR)/A.o $(BUILDDIR)/B.o -L$(BUILDDIR) -Xlinker -add_ast_path -Xlinker A.swiftmodule -Xlinker -add_ast_path -Xlinker B.swiftmodule
$(SWIFTC) $(patsubst -g,,$(SWIFTFLAGS)) -o $@ $(BUILDDIR)/objc_main.o $(BUILDDIR)/A.o $(BUILDDIR)/B.o -L$(BUILDDIR) -Xlinker -add_ast_path -Xlinker A.swiftmodule -Xlinker -add_ast_path -Xlinker B.swiftmodule
ifneq "$(CODESIGN)" ""
$(CODESIGN) -s - "$@"
endif
Expand Down

0 comments on commit 0750e0d

Please sign in to comment.