[OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

The changes made in D88594 caused the test OpenMP/driver.c to fail on a 32-bit host becuase it was offloading to a 64-bit architecture by default. The offloading test was moved to a new file and a feature was added to the lit config to check for a 64-bit host.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89696
This commit is contained in:
Joseph Huber 2020-10-19 09:07:02 -04:00
parent 1e55cf77f3
commit 24df30efda
3 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,5 @@
// REQUIRES: x86-registered-target
// REQUIRES: clang-64-bits
// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 -fopenmp-targets=x86_64-unknown-unknown -o - | FileCheck --check-prefix=CHECK-45-VERSION --check-prefix=CHECK-45-VERSION2 %s
// CHECK-45-VERSION: #define _OPENMP 201511
// CHECK-45-VERSION2: #define _OPENMP 201511

View File

@ -27,7 +27,6 @@
// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 | FileCheck --check-prefix=CHECK-45-VERSION %s
// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 -fopenmp-simd | FileCheck --check-prefix=CHECK-45-VERSION %s
// RUN: %clang %s -c -E -dM -fopenmp=libomp -fopenmp-version=45 -fopenmp-targets=x86_64-unknown-unknown -o - | FileCheck --check-prefix=CHECK-45-VERSION --check-prefix=CHECK-45-VERSION2 %s
// CHECK-45-VERSION: #define _OPENMP 201511
// CHECK-45-VERSION2: #define _OPENMP 201511

View File

@ -1,6 +1,7 @@
# -*- Python -*-
import os
import sys
import platform
import re
import subprocess
@ -167,6 +168,10 @@ if re.match(r'^arm64(e)?-apple-(macos|darwin)', config.target_triple):
if platform.system() not in ['Windows']:
config.available_features.add('can-remove-opened-file')
# Check 64-bit host
if sys.maxsize > 2**32:
config.available_features.add("clang-64-bits")
def calculate_arch_features(arch_string):
features = []