28 lines · plain
1$ cat foo.cpp2struct nontrivial {3 nontrivial() { }4};5 6void function2()7{8 static const nontrivial magic_static;9}10 11$ cat bar.cpp12void function2();13 14void function1()15{16 function2();17}18 19$ xcrun clang++ -g -flto=thin -O2 foo.cpp bar.cpp -c20$ xcrun clang++ -flto=thin foo.o bar.o -Xlinker -object_path_lto -Xlinker lto -shared -o foobar.dylib21 22RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty23 24RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty25 26CHECK-NOT: could not find symbol '__ZZ9function2vE12magic_static'27CHECK-NOT: could not find symbol 'symbol __ZGVZ9function2vE12magic_static'28