francii added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:274
 
-    if (Args.hasArg(options::OPT_pg)) {
+    if (Args.hasArg(options::OPT_p, options::OPT_pg)) {
       CmdArgs.push_back(Args.MakeArgString((llvm::Twine("-L") + D.SysRoot) +
----------------
daltenty wrote:
> Maybe I'm a bit confused, I though these options had different handling with 
> respect to the paths? Otherwise, it's simply an alias.
You may be referring to lines 167-175 of this same file:
```
  auto getCrt0Basename = [&Args, IsArch32Bit] {
    // Enable gprofiling when "-pg" is specified.
    if (Args.hasArg(options::OPT_pg))
      return IsArch32Bit ? "gcrt0.o" : "gcrt0_64.o";
    // Enable profiling when "-p" is specified.
    else if (Args.hasArg(options::OPT_p))
      return IsArch32Bit ? "mcrt0.o" : "mcrt0_64.o";
    else
      return IsArch32Bit ? "crt0.o" : "crt0_64.o";
  };
```
This is the only time we handle `-p` differently. With both `-p` and `-pg`, we 
want to link the profiled libraries.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137753

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

Reply via email to