[PATCH] D91620: [compiler-rt][test] Heed COMPILER_RT_DEBUG when compiling unittests
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 07:09:50 PDT 2022
ro added a subscriber: uweigand.
ro added a comment.
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:
******************** 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.
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