13d6c7d6eSJonas Devlieghere$ cat foo.cpp 23d6c7d6eSJonas Devliegherestruct nontrivial { 33d6c7d6eSJonas Devlieghere nontrivial() { } 43d6c7d6eSJonas Devlieghere}; 53d6c7d6eSJonas Devlieghere 63d6c7d6eSJonas Devliegherevoid function2() 73d6c7d6eSJonas Devlieghere{ 83d6c7d6eSJonas Devlieghere static const nontrivial magic_static; 93d6c7d6eSJonas Devlieghere} 103d6c7d6eSJonas Devlieghere 113d6c7d6eSJonas Devlieghere$ cat bar.cpp 123d6c7d6eSJonas Devliegherevoid function2(); 133d6c7d6eSJonas Devlieghere 143d6c7d6eSJonas Devliegherevoid function1() 153d6c7d6eSJonas Devlieghere{ 163d6c7d6eSJonas Devlieghere function2(); 173d6c7d6eSJonas Devlieghere} 183d6c7d6eSJonas Devlieghere 193d6c7d6eSJonas Devlieghere$ xcrun clang++ -g -flto=thin -O2 foo.cpp bar.cpp -c 203d6c7d6eSJonas Devlieghere$ xcrun clang++ -flto=thin foo.o bar.o -Xlinker -object_path_lto -Xlinker lto -shared -o foobar.dylib 213d6c7d6eSJonas Devlieghere 223d6c7d6eSJonas DevlieghereRUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty 235f2a7fa6SAlexey Lapshin 24*f1fdfe68SAlexey LapshinRUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty 255f2a7fa6SAlexey Lapshin 2659000143SJonas DevlieghereCHECK-NOT: could not find symbol '__ZZ9function2vE12magic_static' 2759000143SJonas DevlieghereCHECK-NOT: could not find symbol 'symbol __ZGVZ9function2vE12magic_static' 28