[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 16:46:08 PDT 2023


MaskRay added a comment.

In D149193#4331015 <https://reviews.llvm.org/D149193#4331015>, @dyung wrote:

> Hi @MaskRay, the test you modified clang/test/Driver/split-debug.c is failing on the PS5 Windows bot, can you take a look?
>
> https://lab.llvm.org/buildbot/#/builders/216/builds/20981
>
>   # command stderr:
>   Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\split-debug.c:72:21: error: SPLIT_LINK_NULL: expected string not found in input
>   // SPLIT_LINK_NULL: "-dumpdir" "/dev/null-"
>                       ^
>   <stdin>:1:1: note: scanning from here
>   clang version 17.0.0 (https://github.com/llvm/llvm-project.git 16a0a69aadf1ad04efeaab9073bebdfb4b4fd34f)
>   ^
>   <stdin>:5:130: note: possible intended match here
>    "z:\\b\\llvm-clang-x86_64-sie-win\\build\\bin\\clang.exe" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-dumpdir" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "split-debug.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debug-info-kind=constructor" "-dwarf-version=5" "-debugger-tuning=gdb" "-ggnu-pubnames" "-split-dwarf-file" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy-split-debug.dwo" "-split-dwarf-output" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy-split-debug.dwo" "-fcoverage-compilation-dir=Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\clang\\test\\Driver" "-resource-dir" "z:\\b\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\17" "-internal-isystem" "z:\\b\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\17\\include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\clang\\test\\Driver" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\split-debug-c67aff.o" "-x" "c" "Z:\\b\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver\\split-debug.c"
>                                                                                                                                    ^
>   Input file: <stdin>
>   Check file: Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\split-debug.c
>   -dump-input=help explains the following input dump.
>   Input was:
>   <<<<<<
>               1: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 16a0a69aadf1ad04efeaab9073bebdfb4b4fd34f) 
>   check:72'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
>               2: Target: x86_64-unknown-linux-gnu 
>   check:72'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>               3: Thread model: posix 
>   check:72'0     ~~~~~~~~~~~~~~~~~~~~
>               4: InstalledDir: z:\b\llvm-clang-x86_64-sie-win\build\bin 
>   check:72'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>               5:  "z:\\b\\llvm-clang-x86_64-sie-win\\build\\bin\\clang.exe" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-dumpdir" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy-" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "split-debug.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debug-info-kind=constructor" "-dwarf-version=5" "-debugger-tuning=gdb" "-ggnu-pubnames" "-split-dwarf-file" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy-split-debug.dwo" "-split-dwarf-output" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy-split-debug.dwo" "-fcoverage-compilation-dir=Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\clang\\test\\Driver" "-resource-dir" "z:\\b\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\17" "-internal-isystem" "z:\\b\\llvm-clang-x86_64-sie-win\\build\\lib\\clang\\17\\include" "-internal-isystem" "/usr/local/include" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\clang\\test\\Driver" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\split-debug-c67aff.o" "-x" "c" "Z:\\b\\llvm-clang-x86_64-sie-win\\llvm-project\\clang\\test\\Driver\\split-debug.c" 
>   check:72'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   check:72'1                                                                                                                                      ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         possible intended match
>               6:  "ld" "-pie" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\tmpq2vte1gy" "Scrt1.o" "crti.o" "crtbeginS.o" "C:\\Users\\buildbot\\AppData\\Local\\Temp\\lit-tmp-zjxfa_79\\split-debug-c67aff.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o" 
>   check:72'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   >>>>>>
>   error: command failed with exit status: 1
>   --
>   ********************

Sorry for the breakage. Should have been fixed by 8b16fc2e17c0149125e339f45d66f6c4eac9fec8 <https://reviews.llvm.org/rG8b16fc2e17c0149125e339f45d66f6c4eac9fec8> by using `%if !system-windows`.

lit emulates `/dev/null` on Windows, so we get something like `"-dumpdir" "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\lit-tmp-zu3jus70\\tmpzynja93m-"`.

This RUN line is mostly to document our behavior and is less interesting.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149193



More information about the cfe-commits mailing list