Index: clang/lib/Driver/ToolChain.cpp =================================================================== --- clang/lib/Driver/ToolChain.cpp +++ clang/lib/Driver/ToolChain.cpp @@ -818,7 +818,7 @@ else if (LibName == "platform" || LibName == "") { ToolChain::RuntimeLibType RtLibType = GetRuntimeLibType(Args); if (RtLibType == ToolChain::RLT_CompilerRT) { - if (getTriple().isAndroid()) + if (getTriple().isAndroid() || getTriple().isOSAIX()) unwindLibType = ToolChain::UNW_CompilerRT; else unwindLibType = ToolChain::UNW_None; Index: clang/lib/Driver/ToolChains/AIX.cpp =================================================================== --- clang/lib/Driver/ToolChains/AIX.cpp +++ clang/lib/Driver/ToolChains/AIX.cpp @@ -327,6 +327,7 @@ switch (GetCXXStdlibType(Args)) { case ToolChain::CST_Libcxx: CmdArgs.push_back("-lc++"); + CmdArgs.push_back("-lc++abi"); return; case ToolChain::CST_Libstdcxx: llvm::report_fatal_error("linking libstdc++ unimplemented on AIX"); Index: clang/lib/Driver/ToolChains/CommonArgs.cpp =================================================================== --- clang/lib/Driver/ToolChains/CommonArgs.cpp +++ clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -1537,17 +1537,23 @@ break; } case ToolChain::UNW_CompilerRT: - if (LGT == LibGccType::StaticLibGcc) + if (TC.getTriple().isOSAIX()) { + // AIX only has libunwind as a shared library. So do not pass + // anything in if -static is specified. + if (LGT != LibGccType::StaticLibGcc) + CmdArgs.push_back("-lunwind"); + } else if (LGT == LibGccType::StaticLibGcc) { CmdArgs.push_back("-l:libunwind.a"); - else if (TC.getTriple().isOSCygMing()) { + } else if (TC.getTriple().isOSCygMing()) { if (LGT == LibGccType::SharedLibGcc) CmdArgs.push_back("-l:libunwind.dll.a"); else // Let the linker choose between libunwind.dll.a and libunwind.a // depending on what's available, and depending on the -static flag CmdArgs.push_back("-lunwind"); - } else + } else { CmdArgs.push_back("-l:libunwind.so"); + } break; } Index: clang/test/Driver/aix-ld.c =================================================================== --- clang/test/Driver/aix-ld.c +++ clang/test/Driver/aix-ld.c @@ -19,7 +19,9 @@ // CHECK-LD32: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc.o" // CHECK-LD32: "-bbinder:{{.*}}bind64" // CHECK-LD32-NOT: "-lc++" +// CHECK-LD32-NOT: "-lc++abi" // CHECK-LD32: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32: "-lunwind" // CHECK-LD32-NOT: "-lm" // CHECK-LD32: "-lc" @@ -41,7 +43,9 @@ // CHECK-LD64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64: "-bbinder:{{.*}}bind64" // CHECK-LD64-NOT: "-lc++" +// CHECK-LD64-NOT: "-lc++abi" // CHECK-LD64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64: "-lunwind" // CHECK-LD64-NOT: "-lm" // CHECK-LD64: "-lc" @@ -64,7 +68,9 @@ // CHECK-LD32-PTHREAD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc.o" // CHECK-LD32-PTHREAD: "-bbinder:{{.*}}bind64" // CHECK-LD32-PTHREAD-NOT: "-lc++" +// CHECK-LD32-PTHREAD-NOT: "-lc++abi" // CHECK-LD32-PTHREAD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-PTHREAD: "-lunwind" // CHECK-LD32-PTHREAD: "-lpthreads" // CHECK-LD32-PTHREAD-NOT: "-lm" // CHECK-LD32-PTHREAD: "-lc" @@ -88,7 +94,9 @@ // CHECK-LD64-PTHREAD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-PTHREAD: "-bbinder:{{.*}}bind64" // CHECK-LD64-PTHREAD-NOT: "-lc++" +// CHECK-LD64-PTHREAD-NOT: "-lc++abi" // CHECK-LD64-PTHREAD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-PTHREAD: "-lunwind" // CHECK-LD64-PTHREAD: "-lpthreads" // CHECK-LD64-PTHREAD-NOT: "-lm" // CHECK-LD64-PTHREAD: "-lc" @@ -112,7 +120,9 @@ // CHECK-LD32-PROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc.o" // CHECK-LD32-PROF: "-bbinder:{{.*}}bind64" // CHECK-LD32-PROF-NOT: "-lc++" +// CHECK-LD32-PROF-NOT: "-lc++abi" // CHECK-LD32-PROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-PROF: "-lunwind" // CHECK-LD32-PROF-NOT: "-lm" // CHECK-LD32-PROF: "-lc" @@ -135,7 +145,9 @@ // CHECK-LD64-GPROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-GPROF: "-bbinder:{{.*}}bind64" // CHECK-LD64-GPROF-NOT: "-lc++" +// CHECK-LD64-GPROF-NOT: "-lc++abi" // CHECK-LD64-GPROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-GPROF: "-lunwind" // CHECK-LD64-GPROF-NOT: "-lm" // CHECK-LD64-GPROF: "-lc" @@ -158,7 +170,9 @@ // CHECK-LD32-STATIC: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc.o" // CHECK-LD32-STATIC: "-bbinder:{{.*}}bind64" // CHECK-LD32-STATIC-NOT: "-lc++" +// CHECK-LD32-STATIC-NOT: "-lc++abi" // CHECK-LD32-STATIC: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-STATIC-NOT: "-lunwind" // CHECK-LD32-STATIC-NOT: "-lm" // CHECK-LD32-STATIC: "-lc" @@ -182,7 +196,9 @@ // CHECK-LD32-LIBP: "-bbinder:{{.*}}bind64" // CHECK-LD32-LIBP: "-L[[SYSROOT]]/powerpc-ibm-aix7.1.0.0" // CHECK-LD32-LIBP-NOT: "-lc++" +// CHECK-LD32-LIBP-NOT: "-lc++abi" // CHECK-LD32-LIBP: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-LIBP: "-lunwind" // CHECK-LD32-LIBP-NOT: "-lm" // CHECK-LD32-LIBP: "-lc" @@ -206,7 +222,9 @@ // CHECK-LD32-NO-STD-LIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc.o" // CHECK-LD32-NO-STD-LIB: "-bbinder:{{.*}}bind64" // CHECK-LD32-NO-STD-LIB-NOT: "-lc++" +// CHECK-LD32-NO-STD-LIB-NOT: "-lc++abi" // CHECK-LD32-NO-STD-LIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-NO-STD-LIB-NOT: "-lunwind" // CHECK-LD32-NO-STD-LIB-NOT: "-lpthreads" // CHECK-LD32-NO-STD-LIB-NOT: "-lm" // CHECK-LD32-NO-STD-LIB-NOT: "-lc" @@ -231,7 +249,9 @@ // CHECK-LD64-NO-DEFAULT-LIBS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-NO-DEFAULT-LIBS: "-bbinder:{{.*}}bind64" // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc++" +// CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc++abi" // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lunwind" // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lpthreads" // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lm" // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc" @@ -257,7 +277,9 @@ // CHECK-LD32-ARG-ORDER: "-bnocdtors" // CHECK-LD32-ARG-ORDER-NOT: "-bcdtors:all:0:s" // CHECK-LD32-ARG-ORDER-NOT: "-lc++" +// CHECK-LD32-ARG-ORDER-NOT: "-lc++abi" // CHECK-LD32-ARG-ORDER: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-ARG-ORDER: "-lunwind" // CHECK-LD32-ARG-ORDER-NOT: "-lm" // CHECK-LD32-ARG-ORDER: "-lc" @@ -283,7 +305,9 @@ // CHECK-LD32-CXX-ARG-ORDER: "-bnocdtors" // CHECK-LD32-CXX-ARG-ORDER-NOT: "-bcdtors:all:0:s" // CHECK-LD32-CXX-ARG-ORDER: "-lc++" +// CHECK-LD32-CXX-ARG-ORDER: "-lc++abi" // CHECK-LD32-CXX-ARG-ORDER: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-CXX-ARG-ORDER: "-lunwind" // CHECK-LD32-CXX-ARG-ORDER: "-lm" // CHECK-LD32-CXX-ARG-ORDER: "-lc" @@ -304,7 +328,9 @@ // CHECK-LD32-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-CXX-ARG-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD32-CXX-ARG-LCXX: "-lc++" +// CHECK-LD32-CXX-ARG-LCXX: "-lc++abi" // CHECK-LD32-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-CXX-ARG-LCXX: "-lunwind" // CHECK-LD32-CXX-ARG-LCXX: "-lm" // CHECK-LD32-CXX-ARG-LCXX: "-lc" @@ -325,7 +351,9 @@ // CHECK-LD64-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc64.o" // CHECK-LD64-CXX-ARG-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD64-CXX-ARG-LCXX: "-lc++" +// CHECK-LD64-CXX-ARG-LCXX: "-lc++abi" // CHECK-LD64-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-CXX-ARG-LCXX: "-lunwind" // CHECK-LD64-CXX-ARG-LCXX: "-lm" // CHECK-LD64-CXX-ARG-LCXX: "-lc" @@ -347,7 +375,9 @@ // CHECK-LD32-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-NODEFLIB-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc++" +// CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc++abi" // CHECK-LD32-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-NODEFLIB-LCXX-NOT: "-lunwind" // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lm" // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc" @@ -369,7 +399,9 @@ // CHECK-LD64-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc64.o" // CHECK-LD64-NODEFLIB-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc++" +// CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc++abi" // CHECK-LD64-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-NODEFLIB-LCXX-NOT: "-lunwind" // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lm" // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc" @@ -391,7 +423,9 @@ // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-NOSTDLIB-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc++" +// CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc++abi" // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lunwind" // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lm" // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc" @@ -413,7 +447,9 @@ // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc64.o" // CHECK-LD64-NOSTDLIB-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc++" +// CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc++abi" // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lunwind" // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lm" // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc" @@ -436,7 +472,9 @@ // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-NOSTDLIBXX-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "-lc++" +// CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "-lc++abi" // CHECK-LD32-NOSTDLIBXX-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-NOSTDLIBXX-LCXX: "-lunwind" // CHECK-LD32-NOSTDLIBXX-LCXX: "-lm" // CHECK-LD32-NOSTDLIBXX-LCXX: "-lc" @@ -458,7 +496,9 @@ // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc64.o" // CHECK-LD64-NOSTDLIBXX-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "-lc++" +// CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "-lc++abi" // CHECK-LD64-NOSTDLIBXX-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-NOSTDLIBXX-LCXX: "-lunwind" // CHECK-LD64-NOSTDLIBXX-LCXX: "-lm" // CHECK-LD64-NOSTDLIBXX-LCXX: "-lc" @@ -480,7 +520,9 @@ // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-NOSTARTFILES-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD32-NOSTARTFILES-LCXX: "-lc++" +// CHECK-LD32-NOSTARTFILES-LCXX: "-lc++abi" // CHECK-LD32-NOSTARTFILES-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-NOSTARTFILES-LCXX: "-lunwind" // CHECK-LD32-NOSTARTFILES-LCXX: "-lm" // CHECK-LD32-NOSTARTFILES-LCXX: "-lc" @@ -502,7 +544,9 @@ // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc64.o" // CHECK-LD64-NOSTARTFILES-LCXX: "-bbinder:{{.*}}bind64" // CHECK-LD64-NOSTARTFILES-LCXX: "-lc++" +// CHECK-LD64-NOSTARTFILES-LCXX: "-lc++abi" // CHECK-LD64-NOSTARTFILES-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-NOSTARTFILES-LCXX: "-lunwind" // CHECK-LD64-NOSTARTFILES-LCXX: "-lm" // CHECK-LD64-NOSTARTFILES-LCXX: "-lc" @@ -548,7 +592,9 @@ // CHECK-LD32-SHARED-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-SHARED: "-bbinder:{{.*}}bind64" // CHECK-LD32-SHARED: "-lc++" +// CHECK-LD32-SHARED: "-lc++abi" // CHECK-LD32-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-SHARED: "-lunwind" // CHECK-LD32-SHARED: "-lm" // CHECK-LD32-SHARED: "-lc" @@ -576,11 +622,12 @@ // CHECK-LD32-SHARED-EXPORTS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc.o" // CHECK-LD32-SHARED-EXPORTS: "-bE:input.exp" // CHECK-LD32-SHARED-EXPORTS: "-lc++" +// CHECK-LD32-SHARED-EXPORTS: "-lc++abi" // CHECK-LD32-SHARED-EXPORTS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-SHARED-EXPORTS: "-lunwind" // CHECK-LD32-SHARED-EXPORTS: "-lm" // CHECK-LD32-SHARED-EXPORTS: "-lc" - // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared. // RUN: %clangxx -x c++ -no-canonical-prefixes %s 2>&1 -### \ // RUN: -resource-dir=%S/Inputs/resource_dir \ @@ -593,7 +640,7 @@ // CHECK-LD64-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]" // CHECK-LD64-SHARED: "{{.*}}CreateExportList" // CHECK-LD64-SHARED: "[[EXPORTLIST:[^"]+]]" -// CHECK-LD64-SHARED: "-X" +// CHECK-LD64-SHARED: "-X" // CHECK-LD64-SHARED: "64" // CHECK-LD64-SHARED: "/bin/env" "LTO_ASSEMBLER_PATH={{.*}}ld{{(.exe)?}}" // CHECK-LD64-SHARED: "-bM:SRE" @@ -606,7 +653,9 @@ // CHECK-LD64-SHARED-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc64.o" // CHECK-LD64-SHARED: "-bbinder:{{.*}}bind64" // CHECK-LD64-SHARED: "-lc++" +// CHECK-LD64-SHARED: "-lc++abi" // CHECK-LD64-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-SHARED: "-lunwind" // CHECK-LD64-SHARED: "-lm" // CHECK-LD64-SHARED: "-lc" @@ -628,7 +677,9 @@ // CHECK-LD32-NOEXCEPTIONS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crteh-powerpc.o" // CHECK-LD32-NOEXCEPTIONS: "-bbinder:{{.*}}bind64" // CHECK-LD32-NOEXCEPTIONS: "-lc++" +// CHECK-LD32-NOEXCEPTIONS: "-lc++abi" // CHECK-LD32-NOEXCEPTIONS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a" +// CHECK-LD32-NOEXCEPTIONS: "-lunwind" // CHECK-LD32-NOEXCEPTIONS: "-lm" // CHECK-LD32-NOEXCEPTIONS: "-lc" @@ -656,7 +707,9 @@ // CHECK-LD64-SHARED-EXPORTS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-SHARED-EXPORTS: "-bE:input.exp" // CHECK-LD64-SHARED-EXPORTS: "-lc++" +// CHECK-LD64-SHARED-EXPORTS: "-lc++abi" // CHECK-LD64-SHARED-EXPORTS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-SHARED-EXPORTS: "-lunwind" // CHECK-LD64-SHARED-EXPORTS: "-lm" // CHECK-LD64-SHARED-EXPORTS: "-lc" @@ -684,7 +737,9 @@ // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-SHARED-EXPORTS-ALT: "-bexport:input.exp" // CHECK-LD64-SHARED-EXPORTS-ALT: "-lc++" +// CHECK-LD64-SHARED-EXPORTS-ALT: "-lc++abi" // CHECK-LD64-SHARED-EXPORTS-ALT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-SHARED-EXPORTS-ALT: "-lunwind" // CHECK-LD64-SHARED-EXPORTS-ALT: "-lm" // CHECK-LD64-SHARED-EXPORTS-ALT: "-lc" @@ -712,7 +767,9 @@ // CHECK-LD64-SHARED-EXPALL-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-SHARED-EXPALL: "-bexpall" // CHECK-LD64-SHARED-EXPALL: "-lc++" +// CHECK-LD64-SHARED-EXPALL: "-lc++abi" // CHECK-LD64-SHARED-EXPALL: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-SHARED-EXPALL: "-lunwind" // CHECK-LD64-SHARED-EXPALL: "-lm" // CHECK-LD64-SHARED-EXPALL: "-lc" @@ -740,6 +797,8 @@ // CHECK-LD64-SHARED-EXPFULL-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}clang_rt.crti-powerpc64.o" // CHECK-LD64-SHARED-EXPFULL: "-bexpfull" // CHECK-LD64-SHARED-EXPFULL: "-lc++" +// CHECK-LD64-SHARED-EXPFULL: "-lc++abi" // CHECK-LD64-SHARED-EXPFULL: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a" +// CHECK-LD64-SHARED-EXPFULL: "-lunwind" // CHECK-LD64-SHARED-EXPFULL: "-lm" // CHECK-LD64-SHARED-EXPFULL: "-lc"