[PATCH] D79693: [test][ARM][CMSE] Use -ffreestanding for arm_cmse.h tests

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun May 10 15:58:12 PDT 2020


hubert.reinterpretcast created this revision.
hubert.reinterpretcast added reviewers: chill, dmgreen.
Herald added subscribers: danielkiss, kristof.beyls.
Herald added a project: clang.

The `arm_cmse.h` header includes standard headers, but some tests that include this header explicitly specify a target. The standard headers found via the standard include paths need not be compatible with the explicitly-specified target from the tests. In order to avoid test failures caused by such incompatibility, this patch adds `-ffreestanding` to the tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79693

Files:
  clang/test/CodeGen/arm-cmse-nonsecure.c
  clang/test/CodeGen/arm-cmse-secure.c


Index: clang/test/CodeGen/arm-cmse-secure.c
===================================================================
--- clang/test/CodeGen/arm-cmse-secure.c
+++ clang/test/CodeGen/arm-cmse-secure.c
@@ -1,5 +1,5 @@
-// RUN: %clang -mlittle-endian -mcmse -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
-// RUN: %clang -mbig-endian    -mcmse -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang -ffreestanding -mlittle-endian -mcmse -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang -ffreestanding -mbig-endian    -mcmse -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
 
 #include <arm_cmse.h>
 
Index: clang/test/CodeGen/arm-cmse-nonsecure.c
===================================================================
--- clang/test/CodeGen/arm-cmse-nonsecure.c
+++ clang/test/CodeGen/arm-cmse-nonsecure.c
@@ -1,5 +1,5 @@
-// RUN: %clang  -mlittle-endian -target thumbv8m.base-eabi  -emit-llvm -S -o - %s | FileCheck %s
-// RUN: %clang  -mbig-endian    -target thumbv8m.base-eabi  -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang -ffreestanding -mlittle-endian -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang -ffreestanding -mbig-endian    -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
 
 #include <arm_cmse.h>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79693.263086.patch
Type: text/x-patch
Size: 1343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200510/c5c0f7d0/attachment.bin>


More information about the cfe-commits mailing list