[swift-lldb-dev] static_linking testcase
francisjricci at gmail.com
Mon Nov 6 13:18:39 CST 2017
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):
clang -g -O0 -fno-builtin
-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
NSLog(@"A = %ld", [[[A alloc] init] foo]);
objc_main.m:22:43: error: no visible @interface for 'B' declares the
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