[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:38:36 PDT 2022


ro added a comment.

In D91620#3836888 <https://reviews.llvm.org/D91620#3836888>, @uweigand wrote:

> 

[...]

>> 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.

As I said, I **do** see `target_cflags` set to ` -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta;-O0;-g ` in `lit.common.configured`, but it had no ill effect on the the `x86_64-pc-linux-gnu` build.  I'm running a new build with the patch to prepend a blank in every case `COMPILER_RT_TEST_COMPILER_CFLAGS` is set.  Unfortunately (the build isn't completed yet), it just changes `target_cflags` to ` -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta; -O0; -g `.

I'd really be grateful if someone could explain what this `" "` -> `";"` substitution is for.  Maybe it can just be dropped?


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