[PATCH] D91620: [compiler-rt][test] Heed COMPILER_RT_DEBUG when compiling unittests

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 07:30:55 PDT 2022


uweigand added a comment.

In D91620#3836854 <https://reviews.llvm.org/D91620#3836854>, @ro wrote:

> This seems to cause another regression, apparently only visible in cross builds: clang-s390x-linux buildbot <https://lab.llvm.org/buildbot#builders/94/builds/11285>: a link failure like this:

Just to clarify, this build bot does *not* perform a cross build, it's a regular native build, just running on the s390x architecture.

>   ******************** TEST 'AddressSanitizer-s390x-linux ::
>   TestCases/Linux/init-order-dlopen.cpp' FAILED ********************
>   Script:
>   [...]
>   
>   : 'RUN: at line 5';
>   /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/./bin/clang
>   --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer
>   -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only
>   -O3;-g -mbackchain -O0
>   /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/compiler-rt/test/asan/TestCases/Linux/init-order-dlopen.cpp
>   -ldl -Wl,--export-dynamic -o
>   /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/projects/compiler-rt/test/asan/S390XLinuxConfig/TestCases/Linux/Output/init-order-dlopen.cpp.tmp
>   [...]
>   --
>   Exit Code: 127
>   
>   Command Output (stderr):
>   --
>   clang-16: error: no input files
>   /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/projects/compiler-rt/test/asan/S390XLinuxConfig/TestCases/Linux/Output/init-order-dlopen.cpp.script:
>   line 1: -g: command not found
>
> The `-O3;-g` on the link line seems to come from `compiler-rt/test/lit.common.configured`.  I suspect that can be traced down to code in `compiler-rt/CMakeLists.txt` which replaces `" "` by `";"` in `COMPILER_RT_TEST_COMPILER_CFLAGS`.  I don't really understand this and it seems terribly fragile to me, but I believe this can be avoided by prepending the new instances of setting `COMPILER_RT_TEST_COMPILER_CFLAGS` in `compiler-rt/CMakeLists.txt` with a blank.  I have a patch for that and am trying to test it, but as mentioned the issue hasn't affected me.  @uweigand may be able to help.

I don't see anything particularly special to s390x here, with the only exception of  `-mbackchain`.  This flag is added to sanitizer tests on s390x, where we need it for the same reason other platforms tend to need `-fno-omit-frame-pointer`.  It's unclear how that would be related to this ";" issue.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91620



More information about the llvm-commits mailing list