r357713 - Verify that Android targets generate DWARF 4 by default.

Alex L via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 18:21:13 PDT 2019


Hi Stephen,

It looks like your change has caused the 'debug-options.c' test to start
failing on Darwin. It looks like we emit "-dwarf-version=4" by default, and
not 2. Could you please take a look.

Here's a link to a latest build on the public LLVM CI that contains the
failure:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/59772/console

Here's the failure itself:
Command Output (stderr): --
/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm/tools/clang/test/Driver/debug-options.c:280:14:
error: G_DWARF2: expected string not found in input // G_DWARF2:
"-dwarf-version=2" ^ <stdin>:5:515: note: scanning from here
"/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/clang-build/bin/clang-9"
"-cc1" "-triple" "x86_64-apple-macosx10.13.0" "-Wdeprecated-objc-isa-usage"
"-Werror=deprecated-objc-isa-usage" "-emit-obj" "-mrelax-all"
"-disable-free" "-main-file-name" "debug-options.c" "-mrelocation-model"
"pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim"
"-masm-verbose" "-munwind-tables" "-faligned-alloc-unavailable"
"-target-cpu" "penryn" "-dwarf-column-info" "-debug-info-kind=standalone"
"-dwarf-version=4" "-debugger-tuning=lldb" "-ggnu-pubnames"
"-target-linker-version" "351.8" "-coverage-notes-file"
"/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/clang-build/tools/clang/test/Driver/debug-options.gcno"
"-resource-dir"
"/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/clang-build/lib/clang/9.0.0"
"-fdebug-compilation-dir"
"/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/clang-build/tools/clang/test/Driver"
"-ferror-limit" "19" "-fmessage-length" "0" "-stack-protector" "1"
"-fblocks" "-fencode-extended-block-signature"
"-fregister-global-dtors-with-atexit" "-fobjc-runtime=macosx-10.13.0"
"-fmax-type-align=16" "-fdiagnostics-show-option" "-o" "debug-options.o"
"-x" "c"
"/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm/tools/clang/test/Driver/debug-options.c"
^


Adrian, I've looped you in since you reviewed the commit it looks like. Do
you know if that's expected behavior on Darwin?

Cheers,
Alex

On Thu, 4 Apr 2019 at 11:16, Stephen Hines via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: srhines
> Date: Thu Apr  4 11:17:46 2019
> New Revision: 357713
>
> URL: http://llvm.org/viewvc/llvm-project?rev=357713&view=rev
> Log:
> 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
>
> Modified:
>     cfe/trunk/test/Driver/debug-options.c
>
> Modified: cfe/trunk/test/Driver/debug-options.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=357713&r1=357712&r2=357713&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/debug-options.c (original)
> +++ cfe/trunk/test/Driver/debug-options.c Thu Apr  4 11:17:46 2019
> @@ -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"
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190404/0473e9a9/attachment.html>


More information about the cfe-commits mailing list