[PATCH] D134657: [Driver] pass -fcrash-diagnostics-dir to LTO

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 16:46:45 PDT 2022


ychen added a comment.

In D134657#3819435 <https://reviews.llvm.org/D134657#3819435>, @thakis wrote:

> This breaks `Driver/crash-diagnostics-dir-2.c` on my mac:
>
>   FAIL: Clang :: Driver/crash-diagnostics-dir-2.c (7510 of 15804)
>   ******************** TEST 'Clang :: Driver/crash-diagnostics-dir-2.c' FAILED ********************
>   Script:
>   --
>   : 'RUN: at line 3';   /Users/thakis/src/llvm-project/out/gn/bin/clang -### -fcrash-diagnostics-dir=mydumps -c /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c 2>&1      | /Users/thakis/src/llvm-project/out/gn/bin/FileCheck /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c --check-prefix=OPTION
>   : 'RUN: at line 6';   /Users/thakis/src/llvm-project/out/gn/bin/clang -### -c /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c 2>&1 | /Users/thakis/src/llvm-project/out/gn/bin/FileCheck /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c --check-prefix=NOOPTION
>   : 'RUN: at line 9';   /Users/thakis/src/llvm-project/out/gn/bin/clang -### -fcrash-diagnostics-dir=mydumps -flto /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c 2>&1      | /Users/thakis/src/llvm-project/out/gn/bin/FileCheck /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c --check-prefix=LTO-OPTION
>   : 'RUN: at line 14';   /Users/thakis/src/llvm-project/out/gn/bin/clang -### -flto /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c 2>&1 | /Users/thakis/src/llvm-project/out/gn/bin/FileCheck /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c --check-prefix=LTO-NOOPTION
>   --
>   Exit Code: 1
>   
>   Command Output (stderr):
>   --
>   /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c:12:16: error: LTO-OPTION: expected string not found in input
>   // LTO-OPTION: "-plugin-opt=-crash-diagnostics-dir=mydumps"
>                  ^
>   <stdin>:5:58: note: scanning from here
>    "/Users/thakis/src/llvm-project/out/gn/bin/clang" "-cc1" "-triple" "arm64-apple-macosx12.0.0" "-Wundef-prefix=TARGET_OS_" "-Werror=undef-prefix" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-llvm-bc" "-flto=full" "-flto-unit" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "crash-diagnostics-dir-2.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=non-leaf" "-ffp-contract=on" "-fno-rounding-math" "-funwind-tables=1" "-fcompatibility-qualified-id-block-type-checking" "-fvisibility-inlines-hidden-static-local-var" "-target-cpu" "apple-m1" "-target-feature" "+v8.5a" "-target-feature" "+crc" "-target-feature" "+lse" "-target-feature" "+rdm" "-target-feature" "+crypto" "-target-feature" "+dotprod" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+fp16fml" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+zcm" "-target-feature" "+zcz" "-target-feature" "+fullfp16" "-target-feature" "+sm4" "-target-feature" "+sha3" "-target-feature" "+sha2" "-target-feature" "+aes" "-target-abi" "darwinpcs" "-fallow-half-arguments-and-returns" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=lldb" "-target-linker-version" "305" "-mllvm" "-crash-diagnostics-dir=mydumps" "-fcoverage-compilation-dir=/Users/thakis/src/llvm-project/out/gn/obj/clang/test/Driver" "-resource-dir" "/Users/thakis/src/llvm-project/out/gn/lib/clang/16.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/Users/thakis/src/llvm-project/out/gn/lib/clang/16.0.0/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/Users/thakis/src/llvm-project/out/gn/obj/clang/test/Driver" "-ferror-limit" "19" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fgnuc-version=4.2.1" "-fmax-type-align=16" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/lit-tmp-hggg2hg5/crash-diagnostics-dir-2-cac6d7.o" "-x" "c" "/Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c"
>                                                            ^
>   <stdin>:5:1241: note: possible intended match here
>    "/Users/thakis/src/llvm-project/out/gn/bin/clang" "-cc1" "-triple" "arm64-apple-macosx12.0.0" "-Wundef-prefix=TARGET_OS_" "-Werror=undef-prefix" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-llvm-bc" "-flto=full" "-flto-unit" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "crash-diagnostics-dir-2.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=non-leaf" "-ffp-contract=on" "-fno-rounding-math" "-funwind-tables=1" "-fcompatibility-qualified-id-block-type-checking" "-fvisibility-inlines-hidden-static-local-var" "-target-cpu" "apple-m1" "-target-feature" "+v8.5a" "-target-feature" "+crc" "-target-feature" "+lse" "-target-feature" "+rdm" "-target-feature" "+crypto" "-target-feature" "+dotprod" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+fp16fml" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+zcm" "-target-feature" "+zcz" "-target-feature" "+fullfp16" "-target-feature" "+sm4" "-target-feature" "+sha3" "-target-feature" "+sha2" "-target-feature" "+aes" "-target-abi" "darwinpcs" "-fallow-half-arguments-and-returns" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=lldb" "-target-linker-version" "305" "-mllvm" "-crash-diagnostics-dir=mydumps" "-fcoverage-compilation-dir=/Users/thakis/src/llvm-project/out/gn/obj/clang/test/Driver" "-resource-dir" "/Users/thakis/src/llvm-project/out/gn/lib/clang/16.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/Users/thakis/src/llvm-project/out/gn/lib/clang/16.0.0/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/Users/thakis/src/llvm-project/out/gn/obj/clang/test/Driver" "-ferror-limit" "19" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fgnuc-version=4.2.1" "-fmax-type-align=16" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/lit-tmp-hggg2hg5/crash-diagnostics-dir-2-cac6d7.o" "-x" "c" "/Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c"
>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^
>   
>   Input file: <stdin>
>   Check file: /Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c
>   
>   -dump-input=help explains the following input dump.
>   
>   Input was:
>   <<<<<<
>               1: clang version 16.0.0 
>               2: Target: arm64-apple-darwin21.6.0 
>               3: Thread model: posix 
>               4: InstalledDir: /Users/thakis/src/llvm-project/out/gn/bin 
>               5:  "/Users/thakis/src/llvm-project/out/gn/bin/clang" "-cc1" "-triple" "arm64-apple-macosx12.0.0" "-Wundef-prefix=TARGET_OS_" "-Werror=undef-prefix" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-llvm-bc" "-flto=full" "-flto-unit" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "crash-diagnostics-dir-2.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=non-leaf" "-ffp-contract=on" "-fno-rounding-math" "-funwind-tables=1" "-fcompatibility-qualified-id-block-type-checking" "-fvisibility-inlines-hidden-static-local-var" "-target-cpu" "apple-m1" "-target-feature" "+v8.5a" "-target-feature" "+crc" "-target-feature" "+lse" "-target-feature" "+rdm" "-target-feature" "+crypto" "-target-feature" "+dotprod" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+fp16fml" "-target-feature" "+ras" "-target-feature" "+rcpc" "-target-feature" "+zcm" "-target-feature" "+zcz" "-target-feature" "+fullfp16" "-target-feature" "+sm4" "-target-feature" "+sha3" "-target-feature" "+sha2" "-target-feature" "+aes" "-target-abi" "darwinpcs" "-fallow-half-arguments-and-returns" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=lldb" "-target-linker-version" "305" "-mllvm" "-crash-diagnostics-dir=mydumps" "-fcoverage-compilation-dir=/Users/thakis/src/llvm-project/out/gn/obj/clang/test/Driver" "-resource-dir" "/Users/thakis/src/llvm-project/out/gn/lib/clang/16.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/Users/thakis/src/llvm-project/out/gn/lib/clang/16.0.0/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/Users/thakis/src/llvm-project/out/gn/obj/clang/test/Driver" "-ferror-limit" "19" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fgnuc-version=4.2.1" "-fmax-type-align=16" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/lit-tmp-hggg2hg5/crash-diagnostics-dir-2-cac6d7.o" "-x" "c" "/Users/thakis/src/llvm-project/clang/test/Driver/crash-diagnostics-dir-2.c" 
>   check:12'0                                                              X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
>   check:12'1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            possible intended match
>               6:  "/usr/bin/ld" "-demangle" "-object_path_lto" "/var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/lit-tmp-hggg2hg5/cc-1d46d4.o" "-lto_library" "/Users/thakis/src/llvm-project/out/gn/lib/libLTO.dylib" "-no_deduplicate" "-dynamic" "-arch" "arm64" "-macosx_version_min" "12.0.0" "-o" "a.out" "/var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/lit-tmp-hggg2hg5/crash-diagnostics-dir-2-cac6d7.o" "-lSystem" 
>   check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   >>>>>>
>   
>   --
>   
>   ********************
>   ********************
>   Failed Tests (1):
>     Clang :: Driver/crash-diagnostics-dir-2.c

Fixed in c4b79bf083e0c50f86f0d <https://reviews.llvm.org/rGc4b79bf083e0c50f86f0dfe85b8bd0df1b3506a0>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134657/new/

https://reviews.llvm.org/D134657



More information about the cfe-commits mailing list