[Openmp-commits] [openmp] b3792ae - [OpenMP][AIX] Fix test config for AIX (#88272)

via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 10 13:06:36 PDT 2024


Author: Xing Xue
Date: 2024-04-10T16:06:31-04:00
New Revision: b3792ae42a4adda5cb51d53f3d6a4b9b025b11fd

URL: https://github.com/llvm/llvm-project/commit/b3792ae42a4adda5cb51d53f3d6a4b9b025b11fd
DIFF: https://github.com/llvm/llvm-project/commit/b3792ae42a4adda5cb51d53f3d6a4b9b025b11fd.diff

LOG: [OpenMP][AIX] Fix test config for AIX (#88272)

This patch fixes the test config so that it works for
`tasking/omp50_taskdep_depobj.c` which uses different flags to test with
compiler's `omp.h`.
* set test environment variable `OBJECT_MODE` to `64` if it is set
explicitly to `64` in the AIX environment. `OBJECT_MODE` is default to
`32` and is recognized by AIX compilers and toolchain. In this way, we
don't need to set `-m64` for all compiler flags for 64-bit mode
* add option `-Wl,-bmaxdata` to 32-bit `test_openmp_flags` used by
`tasking/omp50_taskdep_depobj.c`

Added: 
    

Modified: 
    openmp/runtime/test/lit.cfg

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index e27e52bb4289b9..e8f7f3470580e7 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -112,13 +112,15 @@ if config.operating_system == 'AIX':
     config.available_features.add("aix")
     object_mode = os.environ.get('OBJECT_MODE', '32')
     if object_mode == '64':
-      config.test_flags += " -m64"
+      # Set OBJECT_MODE to 64 for LIT test if it is explicitly set.
+      config.environment['OBJECT_MODE'] = os.environ['OBJECT_MODE']
     elif object_mode == '32':
       # Set user data area to 2GB since the default size 256MB in 32-bit mode
       # is not sufficient to run LIT tests on systems that have a lot of
       # CPUs when creating one worker thread for each CPU and each worker
       # thread uses 4MB stack size.
       config.test_flags += " -Wl,-bmaxdata:0x80000000"
+      config.test_openmp_flags += " -Wl,-bmaxdata:0x80000000"
 
 if 'Linux' in config.operating_system:
     config.available_features.add("linux")


        


More information about the Openmp-commits mailing list