IIRC, the dwarf version on Darwin depends on the deployment target and is 2 for earlier versions of macOS and and 4 for newer ones (I need to dig through the driver code to determine the exact version).
I can take a look at this tomorrow morning. -- adrian > On Apr 4, 2019, at 6:21 PM, Alex L <arpha...@gmail.com> wrote: > > 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 > > <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@lists.llvm.org <mailto:cfe-commits@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 > <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 > <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 > > <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@lists.llvm.org <mailto:cfe-commits@lists.llvm.org> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > <https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits