daltenty added a comment.

In D89696#2344508 <https://reviews.llvm.org/D89696#2344508>, @jhuber6 wrote:

> @daltenty Do you think this will fix the problem on AIX?

It's not just AIX that will have this problem I suspect. If you configure any 
cross-compiling build with a 64-bit host, targeting a 32-bit arch, your going 
to run into the problem. I think checking against a list of known 64-bit arches 
is good enough for the purposes here, but the check still needs to be against 
the target, not the host.

Also, the frontend diagnostic looks like it is off for the same reason:

  else if (getArchPtrSize(T) != getArchPtrSize(TT))
    Diags.Report(diag::err_drv_incompatible_omp_arch)

T seems to be the target triple, not the host, but the diagnostic reads: 
`pointer size is incompatible with host`.



================
Comment at: clang/test/lit.cfg.py:172
+known_arches = ["x86_64", "mips64", "ppc64", "aarch64"]
+if (config.host_ldflags.find("-m32") < 0
+    and any(config.host_triple.startswith(x) for x in known_arches)):
----------------
I don't think this check is meaningful. This just checks how llvm was built, it 
doesn't tell you anything about what clang driver is going to target out of the 
box, which is what we care about here.


================
Comment at: clang/test/lit.cfg.py:174
+    and any(config.host_triple.startswith(x) for x in known_arches)):
   config.available_features.add("clang-64-bits")
 
----------------
Maybe this should be something like `clang-64-bit-default-target` instead to 
clarify what we mean.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89696

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

Reply via email to