]> granicus.if.org Git - clang/commitdiff
Verify that Android targets generate DWARF 4 by default.
authorStephen Hines <srhines@google.com>
Thu, 4 Apr 2019 18:17:46 +0000 (18:17 +0000)
committerStephen Hines <srhines@google.com>
Thu, 4 Apr 2019 18:17:46 +0000 (18:17 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357713 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/debug-options.c

index 58269cbb29bf4dc5538641bb35907a389fb15afc..049414ccd587b3e7f43d542e745d03d20ff0c40f 100644 (file)
 // 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 \
 //
 // G_STANDALONE: "-cc1"
 // G_STANDALONE: "-debug-info-kind=standalone"
+// G_DWARF2: "-dwarf-version=2"
 // G_DWARF4: "-dwarf-version=4"
 //
 // G_GDB:  "-debugger-tuning=gdb"