From 1ee8876d3d703389a27f5e357f67ce1062381e05 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Thu, 4 Apr 2019 18:17:46 +0000 Subject: [PATCH] Verify that Android targets generate DWARF 4 by default. Summary: In the future, Android releases will support DWARF 5, but we need to ensure that older targets only have DWARF 4 generated for them. This patch inserts that verification for all Android releases now. The patch also fixes 2 minor mistakes (a mistakenly moved RUN line, and the missing G_DWARF2 check label). Reviewers: aprantl Reviewed By: aprantl Subscribers: chh, pirama, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60238 llvm-svn: 357713 --- clang/test/Driver/debug-options.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c index 58269cbb29bf..049414ccd587 100644 --- a/clang/test/Driver/debug-options.c +++ b/clang/test/Driver/debug-options.c @@ -17,9 +17,14 @@ // RUN: %clang -### -c -glldb %s -target x86_64-linux-gnu 2>&1 \ // RUN: | FileCheck -check-prefix=G -check-prefix=G_LLDB %s // RUN: %clang -### -c -gsce %s -target x86_64-linux-gnu 2>&1 \ +// RUN: | FileCheck -check-prefix=G -check-prefix=G_SCE %s + +// Android. +// Android should always generate DWARF4. +// RUN: %clang -### -c -g %s -target arm-linux-androideabi 2>&1 \ +// RUN: | FileCheck -check-prefix=G -check-prefix=G_DWARF4 %s // Darwin. -// RUN: | FileCheck -check-prefix=G -check-prefix=G_SCE %s // RUN: %clang -### -c -g %s -target x86_64-apple-darwin 2>&1 \ // RUN: | FileCheck -check-prefix=G_STANDALONE \ // RUN: -check-prefix=G_DWARF2 \ @@ -272,6 +277,7 @@ // // G_STANDALONE: "-cc1" // G_STANDALONE: "-debug-info-kind=standalone" +// G_DWARF2: "-dwarf-version=2" // G_DWARF4: "-dwarf-version=4" // // G_GDB: "-debugger-tuning=gdb"