hubert.reinterpretcast added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:165
 
+    // Since libc++ has dependencies on libm, if we have one then add the 
other.
+    if (getToolChain().ShouldLinkCXXStdlib(Args))
----------------
Is that right?

My check of the libc++ from XL C/C++ for AIX 16.1.0 shows a dependency on 
`libC.a`, but not `libm.a`:
```
[183]   0x00000000    undef      IMP     DS EXTref libC.a(shrcore.o) 
uncaught_exception__3stdFv
```

It seems `-lm` is just linked for C++ invocations. Other targets also pick up 
`-lm` for C++ invocations as a stdlib (not specifically a C++ stdlib).


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:168
+      CmdArgs.push_back("-lm");
     CmdArgs.push_back("-lc");
   }
----------------
Minor nit: Given the spacing in this block, I think a blank line would be 
appropriate to have before this one.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88500/new/

https://reviews.llvm.org/D88500

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to