[PATCH] D107640: [Orc] Enable debug object tests only for 64-bit processes on x86_64 hosts

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 03:00:56 PDT 2021


sgraenitz added a comment.

In D107640#2932721 <https://reviews.llvm.org/D107640#2932721>, @mgorny wrote:

> Just to confirm, the test suite passes for me (both i386 and amd64 build) with the following diff

Great, let's take that for the moment and I will have a look at the 32-bit on x86_64 once I find the time towards the end of the month.



================
Comment at: llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll:1-2
+# REQUIRES: x86-registered-target
+# REQUIRES: 64bit-process
+
----------------
mgorny wrote:
> This correctly skips the test on i386 builds for me, and runs it on amd64 builds. Also note that you need to use `;` as the comment character, as otherwise lli errors out.
Right, we'll need `;`. I didn't double-check in a regular build.


================
Comment at: llvm/test/ExecutionEngine/OrcLazy/lit.local.cfg:11
+# Some tests only work for 64-bit processes on 64-bit hosts.
+if sys.int_info.sizeof_digit == 8:
+    config.available_features.add('64bit-process')
----------------
mgorny wrote:
> This doesn't seem to be correct. On my amd64 system, I get (with Python 3.6 through 3.10):
> ```
> >>> import sys
> >>> sys.int_info
> sys.int_info(bits_per_digit=30, sizeof_digit=4)
> ```
> 
> Even if it worked, it wouldn't be the correct thing to do. It's common to use 64-bit Python on multilib systems where LLVM is 32-bit.
> 
> Given your earlier input, wouldn't it be sufficient to restrict the test to `x86_64`?
Right, the guess that this might refer to the bitness of the compile target was hurried. It's obviously not. I will see whether or not this info is available at LIT config time elsewhere.

> Given your earlier input, wouldn't it be sufficient to restrict the test to x86_64?

I guess in your case it's sufficient, yes. In my repro, however, I build with LLVM_BUILD_32_BITS on a x86_64 host and the test would still run.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107640



More information about the llvm-commits mailing list