[swift-lldb-dev] static_linking testcase

Francis Ricci francisjricci at gmail.com
Mon Nov 6 13:18:39 CST 2017

Hi all,

I'm trying to debug an issue I'm seeing with the AST parsing of swift
files built with the -parse-as-library flag, and I'm trying to use the
static_linking testcase as a starting point (since it's the only lldb
test that uses the flag). However, the test files fail to build for me
(running with Xcode 9.0.1 on macOS 10.12):

$ make
clang -g -O0 -fno-builtin
-isysroot "/Applications/Xcode_9.0.1_fb.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"
-include /Users/fjricci/Source/swift/lldb/packages/Python/lldbsuite/test/make/test_common.h
 -arch x86_64 objc_main.m -fobjc-arc -o main A.o B.o -L
-Xlinker -add_ast_path -Xlinker A.swiftmodule -Xlinker -add_ast_path
-Xlinker B.swiftmodule -Xlinker -rpath -Xlinker
objc_main.m:21:43: error: no visible @interface for 'A' declares the
selector 'foo'
      NSLog(@"A = %ld", [[[A alloc] init] foo]);
                         ~~~~~~~~~~~~~~~~ ^~~
objc_main.m:22:43: error: no visible @interface for 'B' declares the
selector 'bar'
      NSLog(@"B = %ld", [[[B alloc] init] bar]);
                         ~~~~~~~~~~~~~~~~ ^~~
2 errors generated.
make: *** [main] Error 1

It looks like this test might currently be disabled (there's a skipif
rdar annotation - rdar://problem/29543513), but would we expect that
to be because of build failures? The blamed revision looks to be about
demangling ("Adapt lldb to the new swift mangling style").

Any ideas on how to get this testcase building?


More information about the swift-lldb-dev mailing list