================ @@ -1120,3 +1120,19 @@ // RUN: -c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + +// Check No Sanitizer on 32-bit AIX +// RUN: %clang -target powerpc-ibm-aix -m32 %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-LD32-NO-SANITIZER %s +// CHECK-LD32-NO-SANITIZER-NOT: "-latomic" + +// This test verifies that the linker doesn't include '-latomic' when no sanitizers are enabled +// FIXME: Running this test on non-AIX host will result in the following error: +// LLVM ERROR: Sanitizer interface functions must be exported by export files on AIX + +// Check enable AddressSanitizer on 32-bit AIX +// RUN: %if target={{.*aix.*}} %{ \ +// RUN: %clang -target powerpc-ibm-aix -m32 -fsanitize=address %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-LD32-ASAN %s \ +// RUN: %} +// CHECK-LD32-ASAN: "-latomic" ---------------- hubert-reinterpretcast wrote:
Because we are testing both values for the "sanitizer" part of the "sanitizer AND 32-bit" condition, it seems odd that we are only testing one value for the "32-bit" part. Consider covering the "sanitizer AND NOT 32-bit" case. https://github.com/llvm/llvm-project/pull/125388 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits